This project demonstrates how to use Hume AI's OCTAVE TTS API with Python.
Unlike conventional TTS that merely "reads" words, Octave is a speech-language model that understands what words mean in context, unlocking a new level of expressiveness. It acts out characters, generates voices from prompts, and takes instructions to modify the emotion and style of a given utterance.
See the Quickstart guide for a detailed explanation of the code in this project.
-
Clone this examples repository:
git clone https://github.com/humeai/hume-api-examples cd hume-api-examples/tts/tts-python-quickstart
-
Set up the environment:
We recommend
uv
but you can adapt these commands to your preferred package manager.uv init uv add hume python-dotenv aiofiles
-
Set up your API key:
You must authenticate to use the Hume TTS API. Your API key can be retrieved from the Hume AI platform. For detailed instructions, see our documentation on getting your api keys.
This example uses dotenv. Place your API key in a
.env
file at the root of your project.echo "HUME_API_KEY=your_api_key_here" > .env
You can copy the
.env.example
file to use as a template. -
Run the project:
uv run app.py