forked from Blendman974/faceclaw
fix: distinguish automatic local language from legacy English captures
This commit is contained in:
3 files changed
+9
-3
No files matched your search
@@ -14,7 +14,7 @@ export type VoiceProviderSelection = {
|
||||
provider: VoiceProviderKind;
|
||||
/**
|
||||
* Spoken language the provider should expect (ISO 639-1); empty lets it
|
||||
* detect the language. Cloud providers only.
|
||||
* detect the language. Also used by on-device Whisper.
|
||||
*/
|
||||
language?: string;
|
||||
elevenLabsApiKey: string;
|
||||
@@ -77,7 +77,8 @@ function isConfigured(provider: CloudProvider, selection: VoiceProviderSelection
|
||||
* to expect. A running capture is shared only by holders asking for the same.
|
||||
*/
|
||||
export function transcriptionKey(selection: Pick<VoiceProviderSelection, "provider" | "language">): string {
|
||||
return `${selection.provider}:${(selection.language ?? "").trim().toLowerCase()}`;
|
||||
const fallback = selection.provider === "onboard-whisper" ? "en" : "";
|
||||
return `${selection.provider}:${(selection.language ?? fallback).trim().toLowerCase()}`;
|
||||
}
|
||||
|
||||
/** Whether createCloudSttClient would return a cloud client for this selection. */
|
||||
|
||||
Reference in new issue
Block a user