You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: electron/main/audio/README.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,15 @@ Main-process audio pipeline for recording sessions and chunked transcription.
5
5
## Files
6
6
7
7
-`index.ts` - Re-exports the audio module surface.
8
-
-`session-manager.ts` - Owns the active recording session lifecycle, `sessionId`, and HUD state transitions, including the initial transcribing step after recording stops. Runs a 10s watchdog after SESSION_STOP that aborts the session if the final chunk never arrives, and exposes `handleBackgroundRendererGone` to fail the active session when the hidden recording renderer crashes or hangs.
8
+
-`session-manager.ts` - Owns the active recording session lifecycle, `sessionId`, selected microphone device forwarding, and HUD state transitions, including the initial transcribing step after recording stops. Runs a 10s watchdog after SESSION_STOP that aborts the session if the final chunk never arrives, and exposes `handleBackgroundRendererGone` to fail the active session when the hidden recording renderer crashes or hangs.
9
9
-`processor.ts` - Accepts audio chunks, writes temp files, converts to MP3 for GLM or 16k mono WAV for local SenseVoice, calls the configured ASR provider, merges chunk text in order, promotes the HUD into the refine step when applicable, logs final line-break metadata, and runs the final refine/history/inject step once. Empty chunk buffers are recorded as empty transcripts (renderer placeholder markers); an empty final transcript completes the session without refine/history/injection. Exposes `hasReceivedFinalChunk`/`abortChunkSession` for the session watchdog.
10
10
-`converter.ts` - Initializes FFmpeg and converts captured audio to MP3 or 16k mono WAV, with optional low-volume gain.
11
11
12
12
## Current Flow
13
13
14
-
1. The renderer records one session for up to 3 minutes and rotates internal chunks every 29 seconds.
15
-
2. The main process tracks chunk work by `sessionId + chunkIndex` and can process chunk ASR requests out of order.
16
-
3. Finalization only runs after the final chunk has been seen and every chunk from `0..finalChunkIndex` has produced text.
17
-
4. Refinement, line-break-aware final text logging, history writes, and text injection happen once per session after the merged transcript is ready.
18
-
5. Any chunk failure or session cancellation aborts the session and discards late results.
14
+
1. The main process starts a session and sends the hidden recorder the `sessionId` plus the saved microphone device ID when one is selected.
15
+
2. The renderer records one session for up to 3 minutes and rotates internal chunks every 29 seconds.
16
+
3. The main process tracks chunk work by `sessionId + chunkIndex` and can process chunk ASR requests out of order.
17
+
4. Finalization only runs after the final chunk has been seen and every chunk from `0..finalChunkIndex` has produced text.
18
+
5. Refinement, line-break-aware final text logging, history writes, and text injection happen once per session after the merged transcript is ready.
19
+
6. Any chunk failure or session cancellation aborts the session and discards late results.
Copy file name to clipboardExpand all lines: electron/shared/locales/en.json
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,22 @@
142
142
"durationWarning": "Note: Maximum duration for single voice input is 3 minutes.",
143
143
"lowVolumeMode": "Low-volume mode",
144
144
"lowVolumeModeHelp": "Boost quiet speech in software before ASR (may also amplify background noise).",
145
+
"microphone": {
146
+
"label": "Microphone",
147
+
"placeholder": "Select microphone",
148
+
"systemDefault": "System default microphone",
149
+
"refresh": "Detect",
150
+
"detecting": "Detecting...",
151
+
"help": "Choose which input device Voice Key records from.",
152
+
"noDevices": "No microphones detected",
153
+
"deviceFallback": "Microphone {{index}}",
154
+
"unknownDevice": "Selected microphone",
155
+
"unavailableOption": "{{label}} (unavailable)",
156
+
"unavailableHelp": "The selected microphone is unavailable. Recording will fall back to the system default until it returns or you choose another device.",
157
+
"permissionHelp": "Microphone permission is needed to show device names.",
0 commit comments