How to use the expo-speech.speak function in expo-speech

To help you get started, we’ve selected a few expo-speech examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / native-component-list / src / screens / TextToSpeechScreen.tsx View on Github external
_speak = () => {
    const start = () => {
      this.setState({ inProgress: true });
    };
    const complete = () => {
      this.state.inProgress &&
        this.setState({ inProgress: false, paused: false });
    };

    Speech.speak(this.state.selectedExample.text, {
      voice: this.state.voice,
      language: this.state.selectedExample.language,
      pitch: this.state.pitch,
      rate: this.state.rate,
      onStart: start,
      onDone: complete,
      onStopped: complete,
      onError: complete,
    });
  }
github SCasarotto / casarotto-chat / src / pages / Main / Main.js View on Github external
(buttonIndex) => {
					switch (buttonIndex) {
						case 0:
							Speech.speak(currentMessage.text)
							break
						case 1:
							Clipboard.setString(currentMessage.text)
							break
					}
				},
			)

expo-speech

Provides text-to-speech functionality.

MIT
Latest version published 5 months ago

Package Health Score

86 / 100
Full package analysis