Skip to content

Speech

Text-to-speech synthesis

Speech uses the system text-to-speech engine to read text aloud.

Use Speech to:

Note: In Siri Shortcuts, Siri will speak the text. In the app, uses the system synthesizer.

Examples

javascript
await Speech.speak("Hello, World!");
javascript
await Speech.speak("First message");
await Speech.speak("Second message");

Methods

speak

Speak text aloud

Uses the system text-to-speech engine. In Siri Shortcuts, Siri speaks the text.

typescript
static speak(text): void
  • text - Text to speak

Returns: Promise that resolves when speech finishes

Example:

javascript
await Speech.speak("Hello")