feat: user stt language

This commit is contained in:
Timothy Jaeryang Baek
2025-05-24 00:36:30 +04:00
parent 9946dc7b5f
commit baaa285534
14 changed files with 149 additions and 103 deletions
+4 -1
View File
@@ -64,9 +64,12 @@ export const updateAudioConfig = async (token: string, payload: OpenAIConfigForm
return res;
};
export const transcribeAudio = async (token: string, file: File) => {
export const transcribeAudio = async (token: string, file: File, language?: string) => {
const data = new FormData();
data.append('file', file);
if (language) {
data.append('language', language);
}
let error = null;
const res = await fetch(`${AUDIO_API_BASE_URL}/transcriptions`, {