This project uses Deepgram's TTS service to generate audio files in bulk from a CSV.
The project is written in Go and executables are provided for Windows, MacOS, and Linux.
- Get an API key from Deepgram and add it to your environment variables as
DEEPGRAM_API_KEY. - Create a CSV file with the following columns (use the provided
sample-scripts.csvas a template)label: The label for the script. This will be used as the file name.script: The text to be converted to speech.
- Download the executable for your OS from the releases page.
- The tool will try and read the csv locally from
scripts.csv. If it doesn't exist, it will ask for the path to the CSV file.
The following flags are supported at the moment.
-format: The format of the audio file. Supported formats arewavandmp3. Default ismp3.-output: The output directory where the audio files will be saved. Default isaudio/.-csv: The path to the CSV file. Default isscripts.csv.-model: The model name to be used for TTS. Defaults toaura-asteria-en. View the available models here.
-
Generate mp3 files in the default location.
./tts-bulk
-
Generate wav files in a custom location.
./tts-bulk -format=wav -output=/path/to/output