mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-26 19:19:38 +00:00
bec8c7ede4
Frontend for the new omni audio API
(`/v1/omni_gen/{models,generate,cost}/audio`).
### New pages
- **Webapp**: `/create-audio` page (desktop layout + mobile
Generate/History tabs with settings drawers), added to sidebar.
- **Desktop**: new `AUDIO` tab ("Create Audio") with `PromptBoxAudio`,
registered in the app menu / TopBar. Audio enqueues over HTTP and polls
the jobs feed (Tauri task queue untouched).
### Models & promptbox
- Suno Music / Remix / Sounds / Sample + Seed Audio 1.0, fetched live
from `GET /v1/omni_gen/models/audio` with per-model capability gating.
- Always-visible **style prompt** row (Suno tags), instrumental /
keep-lyrics / loop toggles, BPM + musical key popover (Suno Sounds),
sample rate + speed/volume/pitch tuning popover (Seed Audio).
- Audio/image reference uploads with server rules mirrored client-side
(remix/sample require exactly 1 audio track; Seed Audio can't combine
audio + image refs).
- One request can return multiple job tokens (Suno multi-clip) - every
token becomes its own pending card.
### Audio playback in galleries
- New **`@storyteller/ui-audio-player`** lib (wavesurfer.js v7):
waveform + seek, play/pause, volume, duration - only one player plays at
a time.
- Lazy waveform decode (IntersectionObserver + peaks cache) and a
no-waveform `<audio>` fallback if CORS/decode fails.
- Audio cards/rows added once in the shared `ui-generation-list`, so
both hosts' grid + list views get them.
- Audio playback in both lightboxes (webapp lightbox + desktop
lightbox-modal); Library gets an **Audio** filter tab and includes audio
in "All"; downloads keep the right extension.
### Shared plumbing
- `OmniGenApi` gains audio types + `getAudioModels` / `generateAudio` /
`estimateAudioCost`.
- `useOmniGenAudioModels`, request builder, enqueue + cost hook shared
via `@storyteller/omni-gen` (used by both hosts).
- `useGenerationJobs` moved from the webapp into `ui-generation-list`
(with re-export shim) and taught the `audio_generation` category - the
desktop audio feed reuses it.
- Suno model names/descriptions/creator icon added to `model-list`.
66 lines
1.3 KiB
JSON
66 lines
1.3 KiB
JSON
{
|
|
"extends": "../../../tsconfig.base.json",
|
|
"compilerOptions": {
|
|
"outDir": "dist",
|
|
"types": [
|
|
"node",
|
|
"@nx/react/typings/cssmodule.d.ts",
|
|
"@nx/react/typings/image.d.ts",
|
|
"vite/client"
|
|
],
|
|
"rootDir": "src",
|
|
"jsx": "react-jsx",
|
|
"tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo"
|
|
},
|
|
"exclude": [
|
|
"out-tsc",
|
|
"dist",
|
|
"**/*.spec.ts",
|
|
"**/*.test.ts",
|
|
"**/*.spec.tsx",
|
|
"**/*.test.tsx",
|
|
"**/*.spec.js",
|
|
"**/*.test.js",
|
|
"**/*.spec.jsx",
|
|
"**/*.test.jsx",
|
|
"vite.config.ts",
|
|
"vite.config.mts",
|
|
"vitest.config.ts",
|
|
"vitest.config.mts",
|
|
"src/**/*.test.ts",
|
|
"src/**/*.spec.ts",
|
|
"src/**/*.test.tsx",
|
|
"src/**/*.spec.tsx",
|
|
"src/**/*.test.js",
|
|
"src/**/*.spec.js",
|
|
"src/**/*.test.jsx",
|
|
"src/**/*.spec.jsx"
|
|
],
|
|
"include": [
|
|
"src/**/*.js",
|
|
"src/**/*.jsx",
|
|
"src/**/*.ts",
|
|
"src/**/*.tsx"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "../tooltip/tsconfig.lib.json"
|
|
},
|
|
{
|
|
"path": "../loading-spinner/tsconfig.lib.json"
|
|
},
|
|
{
|
|
"path": "../audio-player/tsconfig.lib.json"
|
|
},
|
|
{
|
|
"path": "../../common/tsconfig.lib.json"
|
|
},
|
|
{
|
|
"path": "../../api/tsconfig.lib.json"
|
|
},
|
|
{
|
|
"path": "../../model-list/tsconfig.lib.json"
|
|
}
|
|
]
|
|
}
|