Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

89
Vistas
React-native Expo SpeechOptions

I would like to use these expo react native events (onPause, onResume, onDone,...) which can be found here: https://docs.expo.dev/versions/v44.0.0/sdk/speech/#speecheventcallback but I cannot find any correct way to use it. Can anyone please help me with syntax? I haven't found any examples at all. Thank you Jan

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

const [Playing,setPlaying] = useState(false);
const Text = 'Mom I missed you';
const play = () => {

  Speech.speak(Text,{
      rate:1,
      onStart:() => setPlaying(true), 
      onPause:() => setPlaying(false), 
      onResume:() => setPlaying(true)  
  })

}

return (
  <Button title = 'play' onPress = {play}/>
)

Basically on each events(start, resume, pause) respective callback functions will be called.. don't know about onBoundary and onMark. basically there is a boundary event for SpeechSysthesisUtterance(an api for text to speech for web browsers) maybe onBoundary is related to that.

//This is only for Web-Apps
  let utt = new SpeechSynthesisUtterance('Hello everyone');
  
   utt.addEventListener('boundary' ,(e) => {
          console.log(e.charIndex)
      });

speechSynthesis.speak(utt);
   

e.charIndex is index of Text. https://www.youtube.com/watch?v=nx_k1XCaWWs check at 13:30 min

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda