react-speech-to-text icon indicating copy to clipboard operation
react-speech-to-text copied to clipboard

I can't use the react-hook-speech-to-text in next.js

Open melody4482 opened this issue 1 year ago • 1 comments

Hi, everyone. I am trying to use react-hook-speech-to-text module in my Next.js Chatbot but I get the error when I try to deploy to Vercel. Some dependencies are missing. Please let me know if you have the experience with that.

melody4482 avatar May 24 '23 18:05 melody4482

I had error ReferenceError: navigator is not defined. To solve this I followed this suggestion. To sum up:

  1. Create a separate component where you use react-hook-speech-to-text
  2. Use lazy loading to import it and specify { ssr: false }

KiraLT avatar Oct 15 '23 16:10 KiraLT