Signatures
speak is synchronous on React Native and returns the handle immediately. stop is async.
The pairing is the reverse of the Web SDK.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Turn text into audio
// Get the audio back
const audio = await RunAnywhere.tts.synthesize('Hello from RunAnywhere')
// Play it
const handle = RunAnywhere.tts.speak('Hello from RunAnywhere')
synthesize(text: string, options?: TtsOptions): Promise<Audio>
synthesizeStream(text: string, options?: TtsOptions): AsyncIterable<AudioChunk>
speak(text: string, options?: TtsOptions): SpeechHandle
stop(): Promise<void>
voices(): Promise<Voice[]>
speak is synchronous on React Native and returns the handle immediately. stop is async.
The pairing is the reverse of the Web SDK.const audio = await RunAnywhere.tts.synthesize('Hello', {
voice: 'en_US-amy-medium',
speed: 1.1,
})
| Field | Type | Default |
|---|---|---|
voice | string | none, model default |
language | string | proto default |
speed | number | proto default |
pitch | number | proto default |
format | AudioFormat | proto default |
sampleRate | number | proto default |
await RunAnywhere.tts.stop()
const audio = await RunAnywhere.tts.synthesize('Save me')
// audio.samples is a Uint8Array; write it with your filesystem library of choice