azurerestopenai-apiopenai-whisper

Azure Openai Whipser REST endpoints


I wanted to use Whisper deployed through Azure OpenAI but I am having trouble finding the right resources for it. I am trying to integrate a translator using Whisper in a flutter app that will take multilingual input and give out the output in english. Right now the transcription is working using this endpoint:

https://<dep>.openai.azure.com/openai/deployments/<name>/audio/transcriptions?api-version=2024-02-01 and structuring the request like:

var uri = Uri.parse(whisperEndpoint);
          var request = http.MultipartRequest('POST', uri)
            ..headers['api-key'] = whisperApiKey
            ..files.add(await http.MultipartFile.fromPath('file', filePath));

What is the endpoint for translation, tts and other services?

I have tried sending the text transcribed by whisper back to be translated but I'd prefer direct translation by whisper


Solution

  • You can use below endpoint for trnaslation.

    https://reproaistudio.openai.azure.com/openai/deployments/<deplymentname>/audio/translations?api-version=2024-06-01
    

    And it will convert it into English text.

    Here, is the sample output with Bengali as the input file language.

    enter image description here

    If you want to convert this text to speech then use tts-1 or tts-1-hd models in azure openai.

    Make sure you have your open ai resource in supported region of above models