Skip to content

Text-to-Speech generation with Azure OpenAI TTS models, using both Python SDK and REST API.

License

Notifications You must be signed in to change notification settings

LazaUK/AOAI-TextToSpeech-SDKv1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Text-to-Speech (TTS) generation with Azure OpenAI TTS models

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

Table of contents:

Part 1: Configuring solution environment

  1. 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. screenshot_1.1_environment
  2. Install the required Python packages, by using the pip command and the provided requirements.txt file.
pip install -r requirements.txt

Part 2: Generating speech through Python SDK

Note: detailed description on the code logic to be provided soon..

Part 3: Generating speech through REST API

Note: detailed description on the code logic to be provided soon..

About

Text-to-Speech generation with Azure OpenAI TTS models, using both Python SDK and REST API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published