Skip to navigation

Speechify

Text-to-speech

View as MarkdownOpen in Claude

Speechify is a text-to-speech engine offering natural voices built on its Simba model family.

Models

SignalWire supports the following Speechify models. See Speechify’s documentation for more detail.

ModelDescription
simba-3.0Default. Current-generation multilingual model
simba-3.2English-only model with the lowest latency
simba-englishLegacy English model
simba-multilingualLegacy multilingual model

Model availability varies per voice and per workspace — an unavailable voice and model pairing fails. Test your combination before deploying.

Voices

Press play to audition any Speechify voice, then copy config to grab the value for SWML or your SDK.

Speechify voice IDs come from its voice list API (for example, alicia or alton) — use the voice’s ID, not its display name. The default voice is alicia, an American English female voice.

Browse the available voices in Speechify’s documentation:

Languages

Set the language as an ISO 639-1 code with a region, such as en-US. The simba-3.0 model is multilingual — it covers English, German, Spanish, French, Italian, Brazilian Portuguese, and more, and infers the language from your text in multilingual mode. Refer to Speechify’s docs for current language coverage.

Usage

A voice identifier string has three parts: the speechify engine code, a voice ID, and an optional model.

Format: speechify.<voiceId>:<model>

  • voiceId (required): a Speechify voice ID (for example, alicia); see Voices.
  • model (optional): one of the models above. Defaults to simba-3.0.

Examples:

speechify.alicia:simba-3.0
speechify.alicia

You can also set the model with the separate model parameter of the languages SWML method instead of appending :model to the voice string:

languages:
- name: English
code: en-US
voice: speechify.alicia
model: simba-3.0

Use Speechify voices on a call

A Speechify voice string such as speechify.alicia:simba-3.0 works in each of these places: an AI agent’s languages, the say_voice of SWML’s play, and a tts media item sent with Relay or the REST Calling API. The examples below all use speechify.alicia:simba-3.0. To control speech while it plays, see Speak text on a call.

Replace these values in the samples:

ValueReplace with
<YOUR_BASIC_AUTH_PASSWORD>A password you choose for your SWML server. You include it in the server URL you give SignalWire: https://signalwire:<password>@<host>/swml
<YOUR_PROJECT_ID>Your Project ID
<YOUR_API_TOKEN>An API token with the Voice permission, used only in server code
<YOUR_SPACE>Your Space’s subdomain in <YOUR_SPACE>.signalwire.com
<YOUR_CALL_ID>The ID of an answered call, for the REST command

Give an AI agent a Speechify voice via SWML

The languages list of the SWML ai method sets the voice an AI agent speaks in. The Server SDKs build the document and serve it at /swml on port 3000, only to requests that carry the username signalwire and your password.

# Install: python -m pip install signalwire-sdk
# Save as speechify_ai_agent.py and run: python speechify_ai_agent.py
from signalwire import AgentBase
agent = AgentBase(
name="speechify-ai-agent",
route="/swml",
port=3000,
basic_auth=("signalwire", "<YOUR_BASIC_AUTH_PASSWORD>"),
)
agent.set_prompt_text("You are Ada, the dispatcher for Bayview Taxi. Greet the caller and help them book a ride.")
agent.add_language("English", "en-US", "speechify.alicia:simba-3.0")
agent.serve()

To send calls from your phone number to the server, follow Answer a call via SWML. Call the number, and the agent greets you in the Speechify voice. If you hear a different voice, the voice string isn’t in SignalWire’s catalog, so the call falls back to a default voice. See Custom and cloned voices.

Speak text in a Speechify voice via SWML

The SWML builder’s say() writes a play with a say: URL and the voice in say_voice. This server speaks one sentence in the Speechify voice, then hangs up. Serve it and point your number at it the same way as the AI agent above.

# Install: python -m pip install signalwire-sdk
# Save as speechify_tts.py and run: python speechify_tts.py
from signalwire import SWMLBuilder, SWMLService
service = SWMLService(
name="speechify-tts",
route="/swml",
port=3000,
basic_auth=("signalwire", "<YOUR_BASIC_AUTH_PASSWORD>"),
)
SWMLBuilder(service).say(
"Hello from Bayview Taxi. You are hearing Speechify text to speech on SignalWire.",
voice="speechify.alicia:simba-3.0",
).hangup()
service.serve()

Speak text in a Speechify voice via WebSocket (Relay)

A Relay client in the Server SDKs passes the voice string in a tts media item. This handler answers calls on the default topic, speaks in the Speechify voice, and hangs up when the speech ends.

# Install: python -m pip install signalwire-sdk
# Save as speechify_relay.py and run: python speechify_relay.py
from signalwire.relay import RelayClient
client = RelayClient(
project="<YOUR_PROJECT_ID>",
token="<YOUR_API_TOKEN>",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
async def hang_up_after_playback(_event):
if call.state != "ended":
await call.hangup()
await call.play([{
"type": "tts",
"params": {
"text": "Hello from Bayview Taxi. You are hearing Speechify text to speech on SignalWire.",
"voice": "speechify.alicia:simba-3.0",
},
}], on_completed=hang_up_after_playback)
await call.wait_for_ended()
client.run()

To route calls from your phone number to the handler, assign the number to a Relay Application on the default topic, as described in Answer a call via WebSocket (Relay). Call the number to hear the sentence. If you hear a different voice, SignalWire couldn’t use the voice string and played a fallback voice. If the play is rejected as a bad request, check the voice string for characters a tts item doesn’t accept, such as spaces, parentheses, or /.

Speak text in a Speechify voice on a call in progress via REST

To speak on a call that’s already up, such as from a backend job, send calling.play with the call’s ID and the same tts media item. control_id names the playback so later commands can stop or pause it.

# Install: python -m pip install signalwire-sdk
# Save as speechify_rest.py and run: python speechify_rest.py
from signalwire.rest import RestClient
client = RestClient(
project="<YOUR_PROJECT_ID>",
token="<YOUR_API_TOKEN>",
host="<YOUR_SPACE>.signalwire.com",
)
client.calling.play(
"<YOUR_CALL_ID>",
control_id="speechify-greeting",
play=[{
"type": "tts",
"params": {
"text": "Hello from Bayview Taxi. You are hearing Speechify text to speech on SignalWire.",
"voice": "speechify.alicia:simba-3.0",
},
}],
)

The command returns once SignalWire accepts it, and the call hears the sentence in the Speechify voice. If the call hears a different voice, SignalWire couldn’t use the voice string and played a fallback voice. If the call hears nothing, check the voice string for characters a tts item doesn’t accept, such as spaces, parentheses, or /. The request can return success even when the voice string is rejected.

Create a SWML Script that uses a Speechify voice

A SWML Script hosted in SignalWire runs the Speechify-voiced AI agent above without a server of your own.

  1. In the Dashboard, open My Resources, select + Add, then Script, then SWML Script.
  2. Name the script and leave Used For set to Calling.
  3. Under Handle Calls Using, choose Hosted Script and paste this document into Primary Script.
  4. Select Create.
version: 1.0.0
sections:
main:
- answer: {}
- ai:
prompt:
text: "You are Ada, the dispatcher for Bayview Taxi. Greet the caller and help them book a ride."
languages:
- name: English
code: en-US
voice: "speechify.alicia:simba-3.0"

Assign the script to your phone number as in Answer a call via SWML, then call the number. The agent answers in the Speechify voice.

Next steps