Improvements and tests for live transcription.
This commit is contained in:
1 parent
e4be47f707
commit
18acead43c
14 files changed
+1138
-45
No files matched your search
+2
-4
@@ -9,7 +9,7 @@ import { ModelPicker } from "./components/ModelPicker";
|
||||
import { TranscriptView } from "./components/TranscriptView";
|
||||
import { TranscriptionOptions } from "./components/TranscriptionOptions";
|
||||
import { decodeAudioFile } from "./lib/audio";
|
||||
import { LiveTranscriber, type LiveTranscribeResult } from "./lib/live";
|
||||
import { LIVE_TUNING, LiveTranscriber, type LiveTranscribeResult } from "./lib/live";
|
||||
import { startMicCapture, type MicCapture } from "./lib/mic";
|
||||
import { getDownloadedModels } from "./lib/modelCache";
|
||||
import { registerServiceWorker } from "./pwa/register";
|
||||
@@ -297,9 +297,7 @@ export function App() {
|
||||
// live. `.en` models take neither (same rule as the file flow).
|
||||
const options = (getModel(modelId)?.multilingual ?? false) ? { language, task } : {};
|
||||
const transcriber = new LiveTranscriber({
|
||||
tentativeIntervalMs: 2500,
|
||||
minTentativeSeconds: 2.0,
|
||||
segmenter: { commitSilenceSeconds: 2.5, maxSegmentSeconds: 29 },
|
||||
...LIVE_TUNING,
|
||||
transcribe: (audio) => transcribeLiveSegment(worker, audio, options),
|
||||
onUpdate: (update) => {
|
||||
setLiveCommitted(update.committedText);
|
||||
|
||||
Reference in new issue
Block a user