Skip to navigation

spoken_email

View as MarkdownOpen in Claude

Return an email address said aloud as text: “john dot smith at example dot com” is "john.smith@example.com". Words are kept as words, and letters, digits, and symbols spelled out are joined to them. It reads “dot”, “at” (or “at sign”), “underscore”, “dash”, “plus”, “S as in Sam”, NATO words, and “double”. An address the recognizer already wrote as one is returned lowercased.

from signalwire.speech.spelling import spoken_email

Parameters

text
strRequired

The recognizer’s text.

Returns

str — The address, lowercased. It isn’t validated: check it before you use it, for example by reading it back to the caller.

Example

from signalwire.speech.spelling import spoken_email
print(spoken_email("j o h n underscore smith at example dot co dot uk"))
# john_smith@example.co.uk
print(spoken_email("john dot smith at example dot com"))
# john.smith@example.com
print(spoken_email("Ann.Lee@Example.com"))
# ann.lee@example.com

Part of the speech helpers module.