SpeechSynthesisService

Text-to-speech via the Web Speech Synthesis API. Supports voice selection, language, pitch, rate, and volume. Exposes speaking state as an Observable.

TypeScriptexample.ts
import { SpeechSynthesisService } from '@angular-helpers/browser-web-apis'

# Methods

MethodSignatureReturnsDescription
getVoicesgetVoices(): SpeechSynthesisVoice[]SpeechSynthesisVoice[]Public method getVoices.
watchVoiceswatchVoices(): Observable<SpeechSynthesisVoice[]>Observable<SpeechSynthesisVoice[]>Public method watchVoices.
speakspeak(text: string, options: SpeechOptions): Observable<SpeechState>Observable<SpeechState>Public method speak.
pausepause(): voidvoidPublic method pause.
resumeresume(): voidvoidPublic method resume.
cancelcancel(): voidvoidPublic method cancel.
LCP N/A
CLS N/A
INP N/A