|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIS. - AI Speech Synthesis > AIS. - AI Speech Synthesis |
AIS.SayText |
Top |
MiniRobotLanguage (MRL)
AIS.SayText
Convert text to speech using Elevenlabs API
Intention
The AIS.SayText command converts text to speech using the Elevenlabs API and plays it through the default audio output device.
Before using this command, you must:
1. Set your Elevenlabs API key using AIS.SetKey
2. Select a voice using AIS.SetVoice
Syntax
AIS.SayText|$$Text
P1 - $$Text - The text to convert to speech. Maximum length depends on your Elevenlabs subscription.
Example
' Set your Elevenlabs API Key
AIS.SetKey|your_api_key_here
' Select a voice (optional, defaults to system voice)
AIS.SetVoice|rachel
' Convert text to speech and play it
AIS.SayText|Hello, this is a text to speech test.
Related Commands
- AIS.SetKey - Set the Elevenlabs API key
- AIS.SetVoice - Select the voice for TTS
- AIS.TextToMP3 - Save TTS to MP3 file