Giter VIP home page Giter VIP logo

Comments (1)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
izraip, I am *so* sorry that I didn't follow up on this.  I managed to lose the 
email
bug report and just now noticed it.

I don't feel that pausing listening in the speech library is the appropriate 
way to
handle this.  If you want to speak while the computer is speaking, it would be a
frustrating user experience for it to be invisibly holding its ears.  You might 
be
piping speech output to headphones in which case this isn't a problem, or you 
might
be using a synthesized voice that doesn't match your own, which wouldn't cause 
the
problem.

I had this problem myself when developing http://musicbutler.googlecode.com, 
and have
a few suggestions:

  * Use a female voice if you're a male and vice versa.  This will make Windows less
likely to falsely recognize your voice.

  * Listen for phrases that start with a keyword.  All my musicbutler commands start
with saying the name of the butler, such as "Einstein, play me some Beach 
Boys." 
This makes it unlikely that the computer's voice, or music played over the 
stereo,
will match a phrase being listened for.

  * Manually stop listening before speech.say, and then listen again.  I don't have a
way to programmatically pause listening in the speech API at the moment, so 
your only
option would be to listener.stoplistening() and then to restart.  You could 
wrap the
starting of the listener in a helper function so that you don't duplicate code;
something like

    mylistener = null
    def startup():
        global mylistener
        mylistener = speech.listenfor(["Foo", "Bar", "Baz"], response)
    def response(phrase, listener):
        listener.stoplistening()
        speech.say("Nothing is listening right now")
        startup()
    startup()
    # at the end of the program, you turn off listening via...
    mylistener.stoplistening()


Original comment by [email protected] on 21 Oct 2008 at 11:23

  • Changed state: WontFix

from pyspeech.

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.