> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # Speech helpers > Functions that turn digits and amounts into the words a voice should say, and read what a caller spelled out. [add-pronunciation]: /docs/server-sdks/reference/python/agents/agent-base/add-pronunciation [say]: /docs/server-sdks/reference/python/agents/function-result/say The `signalwire.speech` module gives the words a voice should say for digits and amounts, and `signalwire.speech.spelling` reads letters, digits, and email addresses a caller spelled out. All of them work on English text. The platform normalizes text before its pronunciation rules run, so a bare number is already words by then: [`add_pronunciation()`][add-pronunciation] can't make `"10001"` read digit by digit. Put the words these functions return in a [`say`][say] action, or in the tool result the model reads back. ```python from signalwire.speech import say_digits, say_last_digits, say_money, number_words from signalwire.speech.spelling import read_spelled, spoken_email, spelling_variants ``` ## Numbers #### [say_digits](/docs/server-sdks/reference/python/agents/speech/say-digits) The digits in a string, one word each, in groups. #### [say_last_digits](/docs/server-sdks/reference/python/agents/speech/say-last-digits) The last digits of a number, one word each. #### [say_money](/docs/server-sdks/reference/python/agents/speech/say-money) An amount of money in words. #### [number_words](/docs/server-sdks/reference/python/agents/speech/number-words) A whole number in English words. ## Spelled input #### [read_spelled](/docs/server-sdks/reference/python/agents/speech/read-spelled) The letters, digits, and symbols a caller spelled. #### [spoken_email](/docs/server-sdks/reference/python/agents/speech/spoken-email) An email address said aloud, as text. #### [spelling_variants](/docs/server-sdks/reference/python/agents/speech/spelling-variants) The spellings a word could be, given letters the recognizer confuses. ## Example A tool that reads an account number back digit by digit: ```python {7} from signalwire import AgentBase, FunctionResult from signalwire.speech import say_digits agent = AgentBase(name="billing", route="/billing") def read_account(args, raw_data): words = say_digits(args["account"], group=4) return FunctionResult("Read the account number back.").say( f"Your account number is {words}." ) agent.define_tool( "read_account", "Read the caller's account number back", {"type": "object", "properties": {"account": {"type": "string"}}, "required": ["account"]}, read_account, ) ``` ## Docs - [number_words](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/number-words.md): Return a whole number in English words, without "and". - [read_spelled](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/read-spelled.md): Read the letters, digits, and symbols a caller spelled out, in any of the common spoken forms. - [say_digits](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/say-digits.md): Return the digits in a string as words, one per digit, grouped with commas so the voice pauses between groups. - [say_last_digits](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/say-last-digits.md): Return the last digits of a number as words, one per digit, for "the card ending in" read-backs. - [say_money](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/say-money.md): Return an amount of money in English words, rounded half up to the currency's smallest unit. - [spelling_variants](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/spelling-variants.md): List the spellings a word could be, given the letters your recognizer confuses. - [spoken_email](https://signalwire.com/docs/server-sdks/reference/python/agents/speech/spoken-email.md): Turn an email address a caller said aloud into text, lowercased.