Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

88
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda