Skip to main content

TTS Prompt Configuration

📖 Back to Main Documentation

Configuration for Text-to-Speech (TTS) prompts using OpenAI's TTS engine.

Core Documentation

Integration & Usage


Prompt Configuation

You can define prompts in the config that are then generated with Text to Speech.

You can then use these in your dialplan with the playback commands.

For the prompts we can define "instructions" for tone, language, accent, etc, and pick the voice. The TTS engine uses OpenAI's text to speech engine, which you can test from openai.fm

config :tas,
...
prompts: %{
voice: "alloy",
instructions: "Speak with a prim, British accent.",
response_format: "wav",
recordings: [
%{
text:
"You do not have sufficient credit to make that call, please topup your service and then try again ",
path: "/sounds/en/us/callie/misc/8000/out_of_credit.wav"
},
%{
text: "The destination you have called is unabled to be reached",
path: "/sounds/en/us/callie/misc/8000/unable_to_be_reached.wav"
},
%{
text: "Your call is being transferred to emergency services",
path: "/sounds/en/us/callie/misc/8000/emergency_services_transfer.wav"
}
]
}