FakeSpeechSynthesizer
class FakeSpeechSynthesizer(var script: List<SpeechSynthesisEvent> = listOf(SpeechSynthesisEvent.Started, SpeechSynthesisEvent.Finished), var voicesToReturn: List<SpeechVoice> = emptyList(), var error: SpeechSynthesisException? = null) : SpeechSynthesizing
Scripted SpeechSynthesizing for consumer tests.
Each collected speak records its request, emits script in order, then throws error if set, otherwise completes.
Constructors
Link copied to clipboard
constructor(script: List<SpeechSynthesisEvent> = listOf(SpeechSynthesisEvent.Started, SpeechSynthesisEvent.Finished), voicesToReturn: List<SpeechVoice> = emptyList(), error: SpeechSynthesisException? = null)
Properties
Link copied to clipboard
An exception thrown after the script, or null to complete normally.
Link copied to clipboard
The events every request emits.
Link copied to clipboard
Every request spoken, in order.
Link copied to clipboard
The voices voices returns.