Whisper. Detect language of the audio


Is it possible to detect the incoming language?
My aim is to

  1. User uses a native language to communicate
  2. Whisper translate the audio to English
  3. Use chat to get the proper response for the query
  4. Use whisper to translate from English to the original native language
1 Like

Returning the spoken language as part of the response is something that is a feature in the open-source Whisper, but not part of the API.

You can send some of the audio to the transcription endpoint instead of translation, and then ask another classifier AI “what language”.