TTS CLI Quickstart Guide
Step-by-step guide for integrating the TTS API using Hume’s CLI.
Step-by-step guide for integrating the TTS API using Hume’s CLI.
The Hume CLI provides a simple interface for generating speech, saving voices, and exploring the features of the Hume TTS API. This guide shows how to get started using Hume’s Text-to-Speech capabilities using the Hume CLI. It demonstrates:
Install the Hume CLI using npm:
See usage information by running hume tts --help.
Authenticate using the CLI:
This will open a browser window to the Hume AI platform, where you can retrieve your API key, and then prompt you to enter your API key.
To use Hume TTS,
--description flag to control how the voice sounds. If you don’t provide a description, Hume will examine the text and attempt to determine an appropriate voice.By default, the CLI will
./hume-tts-output)generation_id for the speech, for future referenceWhen you find a voice you like, use the hume voices create command to give it a name and save it to your voice library for future use. You can specify the generation ID:
or, alternatively, use the --last flag to save the most recent generation.
To use a voice from your library, specify its name.
If the speech should sound like it follows from previous speech, you can provide the --context-generation-id flag with the generation_id of the previous speech.
Alternatively, use the --last flag to continue from the most recent generation.
If you specify both a voice and a description, the description acts as “acting instructions”. It will keep the character of the specified voice, but modulated to match the description.
To generate multiple variations of the same text at once, use the --num-generations flag.