tts-1 and tts-1-hd are TTS models from OpenAI, which can produce audio content based on your textual input (prompt). You will find a Jupyter notebook in this repo, that utilises Azure OpenAI deployment of tts-1 to generate MP3 audio for a given textual menu content.
To build this demo, I used the latest version of OpenAI Python SDK - v1.x. To upgrade your openai Python package, please use the following pip command:
pip install --upgrade openai
- Part 1: Configuring solution environment
- Part 2: Generating speech through Python SDK
- Part 3: Generating speech through REST API
- To use Azure OpenAI backend, assign the API endpoint name, key and version, along with the Azure OpenAI deployment name of TTS model to AZURE_OPENAI_API_BASE, AZURE_OPENAI_API_KEY, AZURE_OPENAI_API_VERSION and AZURE_OPENAI_API_DEPLOY_TTS environment variables respectively.
- Install the required Python packages, by using the pip command and the provided requirements.txt file.
pip install -r requirements.txt
Note: detailed description on the code logic to be provided soon..
Note: detailed description on the code logic to be provided soon..