AIC. - Artificial Intelligence Command

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIC. - Artificial Intelligence Command >

AIC. - Artificial Intelligence Command

AIC.SayText

Top


MiniRobotLanguage (MRL)

 

AIC.SayText

Speak text using Text-to-Speech (TTS)

 

Intention

 

The AIC.SayText command converts text to speech using OpenAI's TTS (Text-to-Speech) API. It can play the audio directly or save it to a file for later use.

 

Syntax

 

AIC.SayText|$$Text[|$$Voice][|$$OutputFile]

 

P1 - $$Text - The text to speak

P2 - $$Voice (optional) - Voice to use (alloy, echo, fable, onyx, nova, shimmer)

P3 - $$OutputFile (optional) - Path to save audio file instead of playing

 

Example

 

' Speak text with default voice

AIC.SayText|Hello, how can I help you today?

 

' Use specific voice

AIC.SayText|Welcome to the system|onyx

 

' Save to file

AIC.SayText|This is a test|alloy|C:\Temp\speech.mp3