Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

87
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!