mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
feat(dreams): voice capture via mana-stt
Adds a one-tap voice recorder at the top of the Dreams module. Speak your dream right after waking, the audio is sent through a server-side proxy to mana-stt, and the transcript appears in the entry as soon as it lands. - New /api/v1/dreams/transcribe SvelteKit server route proxies the upload to mana-stt with the server-held MANA_STT_API_KEY (never exposed to the browser); validates mime, size, missing config - Adds MANA_STT_URL + MANA_STT_API_KEY to the mana-web env config in generate-env.mjs (private, not PUBLIC_ prefixed) - New DreamRecorder class wraps MediaRecorder with reactive $state — status, elapsed timer, error; supports cancel - dreamsStore.createFromVoice creates a placeholder dream with processingStatus='transcribing' and kicks off the upload - dreamsStore.transcribeBlob uploads, writes the result back into the dream, falls back to processingStatus='failed' on errors - Adds processingStatus + processingError + audioDurationMs to LocalDream; backwards-compatible defaults in toDream - Mic button in ListView with idle / requesting / recording (with elapsed timer + pulsing red) / stopping states - Cancel button discards the in-flight recording - Transcribing badge ●●● + failed ! badge on dream rows - Inline editor shows live transcription status; while it's running and the user hasn't typed anything, the transcript folds into the edit buffer as soon as it arrives Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
836c9692c5
commit
578c9f3397
9 changed files with 632 additions and 1 deletions
|
|
@ -126,6 +126,9 @@ const APP_CONFIGS = [
|
|||
MIDDLEWARE_URL: (env) => env.MANA_AUTH_URL,
|
||||
PUBLIC_UMAMI_WEBSITE_ID: (env) => env.UMAMI_WEBSITE_ID_MANA || '',
|
||||
PUBLIC_GLITCHTIP_DSN: (env) => env.PUBLIC_GLITCHTIP_DSN || '',
|
||||
// Speech-to-Text proxy (server-side only, never exposed to the client)
|
||||
MANA_STT_URL: (env) => env.STT_URL || 'http://localhost:3020',
|
||||
MANA_STT_API_KEY: (env) => env.MANA_STT_API_KEY || '',
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue