For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • BedrockAgent
      • CLI Tools
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions
      • LiveWire
      • MCP Gateway
      • PomBuilder
      • Prefabs
      • Search
      • SkillBase
      • Skills
      • SWAIGFunction
      • SWMLBuilder
        • add_section
        • ai
        • answer
        • build
        • hangup
        • play
        • render
        • reset
        • say
      • SWMLService
      • WebService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • Chat
      • Compat
      • Datasphere
      • Fabric
      • Imported Numbers
      • Logs
      • Lookup
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSub
      • Queues
      • Recordings
      • Registry
      • RestClient
      • Short Codes
      • SignalWireRestError
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Parameters
  • Returns
  • Example
AgentsSWMLBuilder

say

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

SWMLService

Next
Built with

Add a text-to-speech play verb using the say: URL prefix. This is a convenience wrapper around play() that constructs the say: URL automatically.

Parameters

text
strRequired

The text to speak.

voice
Optional[str]

Voice name for text-to-speech.

language
Optional[str]

Language code (e.g., "en-US").

gender
Optional[str]

Gender for voice selection.

volume
Optional[float]

Volume adjustment level, from -40 to 40 dB.

Returns

Self — The builder instance for method chaining.

Example

1from signalwire import SWMLService, SWMLBuilder
2
3service = SWMLService(name="greeting")
4builder = SWMLBuilder(service)
5
6doc = (
7 builder
8 .answer()
9 .say("Welcome to our service. Please hold.", voice="rime.spore")
10 .sleep(duration=500)
11 .say("Connecting you now.", voice="rime.spore")
12 .build()
13)
14print(doc)