AI Text To Speech
Updated
Speaks the answers aloud.
- Type
comp-ai-text-to-speech- Script class
AITextToSpeechComponent- Per entity
- One
- Version
- 1.0.0
Read about it in Speech: what it does, how to use it from a script, and examples.
Properties
Section titled “Properties”The props the runtime declares for this component, with their defaults and accepted ranges.
| Prop | Default | Range |
|---|---|---|
refDistance |
0 ≤ x ≤ 10000 |
|
volume |
0 ≤ x ≤ 1 |
Live example
Section titled “Live example”Run it in the browser, read its scripts, and download it as an XR Creator project.
Live example
Speak with the browser's voiceAn AI agent's Text To Speech on the WebAPI provider speaks a line when a UI button is pressed, using the browser's own voices: no AI service is needed.
Press Speak to hear the guide. The voices are the browser's own, so they differ between browsers and systems. Drag to orbit the camera, scroll to zoom.
From a script
Section titled “From a script”#pragma lifecycle(startup)
function startup() { const component = self.parent.getComponent(AITextToSpeechComponent); if (component) log(component.props);}