This project demonstrates how to use Hume AI's OCTAVE TTS API with Typescript.
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-typescript-quickstart
-
Install dependencies:
npm install
-
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:
npx ts-node index.ts