From 44837faee84840f35f2d647878e04c33e2ebf9b1 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Mon, 30 Jun 2025 21:03:23 +0545 Subject: [PATCH] Improve ElevenLabs transcription accuracy --- .../ElevenLabsTranscriptionService.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/VoiceInk/Services/CloudTranscription/ElevenLabsTranscriptionService.swift b/VoiceInk/Services/CloudTranscription/ElevenLabsTranscriptionService.swift index 14c31ae..a65ec0a 100644 --- a/VoiceInk/Services/CloudTranscription/ElevenLabsTranscriptionService.swift +++ b/VoiceInk/Services/CloudTranscription/ElevenLabsTranscriptionService.swift @@ -61,6 +61,17 @@ class ElevenLabsTranscriptionService { body.append(modelName.data(using: .utf8)!) body.append(crlf.data(using: .utf8)!) + // Disable audio event tagging + body.append("--\(boundary)\(crlf)".data(using: .utf8)!) + body.append("Content-Disposition: form-data; name=\"tag_audio_events\"\(crlf)\(crlf)".data(using: .utf8)!) + body.append("false".data(using: .utf8)!) + body.append(crlf.data(using: .utf8)!) + + body.append("--\(boundary)\(crlf)".data(using: .utf8)!) + body.append("Content-Disposition: form-data; name=\"temperature\"\(crlf)\(crlf)".data(using: .utf8)!) + body.append("0".data(using: .utf8)!) + body.append(crlf.data(using: .utf8)!) + let selectedLanguage = UserDefaults.standard.string(forKey: "SelectedLanguage") ?? "auto" if selectedLanguage != "auto", !selectedLanguage.isEmpty { body.append("--\(boundary)\(crlf)".data(using: .utf8)!)