Riley-Brown / react-speech-to-text

React Hooks for Speech to Text
MIT License
107 stars 30 forks source link

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

Open melody4482 opened 1 year ago

melody4482 commented 1 year ago

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.

KiraLT commented 8 months ago

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 }