SSML and language detection
Sender ID for Voice Messages
Section titled “Sender ID for Voice Messages”For voice messages (text2speech and text2speech_ssml), the sender_id field controls the caller ID displayed to recipients. If you specify a sender_id value that does not conform to the E.164 phone number format (e.g., missing leading +, containing non-digit characters), the message will be sent from the system default number +493075435114.
⚠️ Some downstream telephony providers may override or not respect the user-defined sender number, regardless of whether it passes the E.164 validation check. The actual caller ID presented to the recipient depends on provider capabilities.
Voice language detection
Section titled “Voice language detection”When voice_lang is null, the system automatically detects the voice language from message content using the patrickschur/language-detection library.
Supported languages: English (EN), German (DE), French (FR), Italian (IT), Spanish (ES), Polish (PL), Dutch (NL), Romanian (RO), Portuguese (PT), Czech (CS), Hungarian (HU), Swedish (SV), Danish (DA), Finnish (FI), Slovak (SK), Croatian (HR), Turkish (TR), Russian (RU), Bulgarian (BG), Ukrainian (UK).
SSML Support
Section titled “SSML Support”The API now supports a subset of SSML (Speech Synthesis Markup Language) for advanced voice message formatting.
Supported Features
Section titled “Supported Features”Available Tags
Section titled “Available Tags”<break>- Insert pauses in speech<say-as>- Control pronunciation of text
Tag Specifications
Section titled “Tag Specifications”<break> Tag
Section titled “<break> Tag”- Purpose: Add pauses between words or sentences
- Attributes:
time(e.g., “1s”, “500ms”) - Pricing: <0.5ms = 1 char, <1s = 2 chars, <1,5s = 3 chars, etc.
<say-as> Tag
Section titled “<say-as> Tag”- Purpose: Control how text is interpreted and spoken
- Supported Attributes:
interpret-as="characters"- Spell out text character by character
- Note: Currently only “characters” value is supported
Wrap your message content with the <speak> root element:
<speak> Your verification code is <say-as interpret-as="characters">A1B2C3</say-as>. <break time="1s"/> Please enter it now.</speak>