feat: user stt language
This commit is contained in:
@@ -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`, {
|
||||
|
||||
Reference in New Issue
Block a user