Giter Site home page Giter Site logo

Comments (7)

justinhessdev avatar justinhessdev commented on June 25, 2024 1

@JamesBrill

So far this is working beautifully. Thanks so much for taking the time to improve the package. I will let you know if I notice any other issues.

from react-speech-recognition.

JamesBrill avatar JamesBrill commented on June 25, 2024

I've made some changes in #2 that should alleviate these issues. Of most relevance to you will be the new startListening and abortListening callbacks. The Web Speech API wrapper should be more resilient against re-renders now too.

Let me know if upgrading to 1.0.3 improves things for you!

from react-speech-recognition.

justinhessdev avatar justinhessdev commented on June 25, 2024

Everything looks great but I'll point out two minor issues I've seen.

  1. The SpeechRecognition still listens when rendered. In my top-level component I call abortListening() and the Web Speech API stops listening. However, it still runs for a half second until componentWillMount gets called. Maybe if by default listening is set to false this will solve that issue. And then on the client side we simply call startListening(). Currently, it seems that the user is always being recorded

The Web Speech API wrapper is more resilient against re-renders now

. However if I am "listening" and I unmount the component I get this warning:

Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the SpeechRecognition component.

from react-speech-recognition.

JamesBrill avatar JamesBrill commented on June 25, 2024
  1. Ah, I was hoping it wouldn't get a chance to record anything in that short space of time. My reason for having it on by default was because I figured most people would want a "plug and play" component that didn't require any initialisation. However, I see the need for your use case to be supported. I'm going to look into making the default state configurable.

  2. This shouldn't be hard to fix - I'll try to deal with this as well.

from react-speech-recognition.

justinhessdev avatar justinhessdev commented on June 25, 2024
  1. Thanks so much. Making default state configurable is really helpful. I owe you one.

  2. Thanks again

Looking forward to the next release

from react-speech-recognition.

JamesBrill avatar JamesBrill commented on June 25, 2024
  1. See #3 for how to set the API to off by default in 1.0.4.

  2. Should also be resolved by those changes.

from react-speech-recognition.

justinhessdev avatar justinhessdev commented on June 25, 2024

THANKS!

Working great

from react-speech-recognition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.