Write numbers as words for non-English speech

English accepts digits in text-to-speech, but Spanish, French, Portuguese, Hindi, Japanese and Chinese require numbers written as words to generate speech.

Short answer. English text-to-speech accepts digits (1, 2, 3), but Spanish, French, Portuguese, Hindi, Japanese and Chinese require numbers to be written as words (one, two, three). Unresolved placeholders like (name) are rejected with an invalid_text error on all languages.

Why numbers must be words in non-English languages

When you send text to Speakvora's speech API, the voice engine must know how to pronounce every character. English voices can interpret digits directly—'2' becomes 'two' or 'second' depending on context. Other languages cannot reliably guess the pronunciation, so they require you to write numbers as words before sending them.

This applies to all non-English languages: Spanish, French, Portuguese, Hindi, Japanese and Chinese. If you send a digit to these voices, the text will either be skipped or cause an error.

English: digits are accepted

English voices accept digits in your text. You can send '1', '2', '3' or any number, and the voice will pronounce it correctly.

English with digits (works)

POST https://speakvora.com/api/v1/speak
{"text": "I have 3 items and 2 orders", "voice": "af_heart", "lang": "en"}

Spanish, French, Portuguese, Hindi, Japanese, Chinese: write numbers as words

For Spanish (es), French (fr), Portuguese (pt), Hindi (hi), Japanese (ja) and Chinese (zh), convert all digits to their word form before sending the text. This ensures the voice engine can pronounce them correctly.

Spanish with numbers as words (correct)

POST https://speakvora.com/api/v1/speak
{"text": "Tengo tres artículos y dos pedidos", "voice": "em_alex", "lang": "es"}

Placeholders are rejected

Unresolved placeholders like (name), (date), or (amount) are not allowed in any language. The API returns an invalid_text error if it finds them. Build the complete sentence yourself by substituting the real values before sending it to the API.

This prevents accidental disclosure of template markers and ensures the voice reads actual content.

Placeholder rejected

POST https://speakvora.com/api/v1/speak
{"text": "Hello (name), your order is (amount) dollars", "voice": "af_heart", "lang": "en"}

Error: invalid_text

Prepare texts in advance with /v1/prepare

If you have many texts to convert, use POST /v1/prepare to queue them for generation without being billed. Send up to 200 texts at once. The API returns which texts are already in the library (ready) and which are being generated in the background (queued). Queued texts are ready in a few seconds, and then /v1/speak returns them quickly.

Prepare is not billed. You only pay when you call /v1/speak to retrieve the audio.

Prepare texts for Spanish

POST https://speakvora.com/api/v1/prepare
{"voice": "em_alex", "lang": "es", "texts": ["Tengo tres artículos", "El total es veinticinco dólares"]}

Frequently asked questions

Can I send digits to Spanish or French voices?

No. Spanish, French, Portuguese, Hindi, Japanese and Chinese voices require numbers to be written as words. English voices accept digits.

What error do I get if I send a digit to a non-English voice?

The API returns an invalid_text error. Convert the digit to its word form and try again.

Can I use placeholders like (name) or (date)?

No. Placeholders are rejected with an invalid_text error on all languages. Substitute the real values into the text before sending it to the API.

Is there a limit to how many texts I can prepare at once?

Yes. POST /v1/prepare accepts up to 200 texts per request. Each text can be 1 to 500 characters.

Do I get charged for using /v1/prepare?

No. /v1/prepare is not billed. You only pay when you call /v1/speak to retrieve the audio.

Related: API documentation, pricing, developer guides and more answers.