feat(voice): auto-detect speech language for transcription (drop forced 'en')

Whisper previously hardcoded language:en, mis-transcribing id/en-mixed
speech. Omitting 'language' makes Whisper auto-detect. Paired with enabling
AI_VOICE_TRANSCRIPTION_ENABLED (BWS secret gmw_ai_voice_transcription_enabled
= true) so new recordings are transcribed.

Spec: .hermes/plans/2026-08-30_recordings-v2-features-spec.md
This commit is contained in:
asepharyana
2026-08-30 13:28:17 +07:00
parent 75ff9274b3
commit a3a91aa2ce
2 changed files with 82 additions and 1 deletions
@@ -31,7 +31,7 @@ export async function transcribeRecording(
const response = await openai.audio.transcriptions.create({
file: createReadStream(oggPath),
model: "whisper-1",
language: "en",
// No `language` param → Whisper auto-detects (handles id/en mixed).
response_format: "text",
});