AIS. - AI Speech Synthesis

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIS. - AI Speech Synthesis >

AIS. - AI Speech Synthesis

AIS.TextToMP3

Top


MiniRobotLanguage (MRL)

 

AIS.TextToMP3

Convert text to MP3 audio file using Elevenlabs API

 

Intention

 

The AIS.TextToMP3 command converts text to speech and saves it as an MP3 audio file instead of playing it immediately. This allows you to save the generated audio for later use.

 

Syntax

 

AIS.TextToMP3|$$Text[|$$FilePath]

 

P1 - $$Text - The text to convert to speech.

P2 - $$FilePath (optional) - The path where to save the MP3 file. If not specified, a default filename is generated.

 

Example

 

' Set your Elevenlabs API Key

AIS.SetKey|your_api_key_here

 

' Select a voice

AIS.SetVoice|rachel

 

' Convert text to MP3 and save to file

AIS.TextToMP3|Welcome to our automated system.|C:\Audio\welcome.mp3

 

' Play the saved file later

AIS.PlayMP3|C:\Audio\welcome.mp3

 

Related Commands

 

- AIS.SayText - Convert text to speech and play immediately

- AIS.PlayMP3 - Play an MP3 file