Giter Club home page Giter Club logo

python-speech-recognition's Issues

changing the key fails

I got a new GCP API key, and I tried to use it but I keep getting broken connection:

Traceback (most recent call last): File "main.py", line 13, in <module> speech=r.recognize_google(audio,key='A...........8g') File "/home/davy/anaconda3/lib/python3.6/site-packages/speech_recognition/__init__.py", line 845, in recognize_google raise RequestError("recognition connection failed: {}".format(e.reason)) speech_recognition.RequestError: recognition connection failed: [Errno 32] Broken pipe
I don't really understand why that is. I noticed that in the init.py file the key is set as follows:

if key is None: key = "AIz...bla...bla..bla...gw" url = "http://www.google.com/speech-api/v2/recognize?{}".format(urlencode({ "client": "chromium", "lang": language, "key": key, }))

Do i need to change the client? but it is just an API key client shouldn't matter right?

speech file can't be longer than 30 seconds

hi

i modifed your code a bit to read from sample file. My sample file is 55 seconds long and I noticed that it get's cut off.

I am using recognize_google.

I am guessing this is some sort of api limitation and that I should probably get my own key.

Alternative for Google Web Speech API

"Caution: The default key provided by SpeechRecognition is for testing purposes only, and Google may revoke it at any time. It is not a good idea to use the Google Web Speech API in production. Even with a valid API key, you’ll be limited to only 50 requests per day, and there is no way to raise this quota. Fortunately, SpeechRecognition’s interface is nearly identical for each API, so what you learn today will be easy to translate to a real-world project."

Sir, since the Google Web Speech API cannot be used in production, what is the alternative for it? I mean how can I use the speech recognition then?

Facing Problem in Executing Rock , papers , scissors game . need help in python

`
'''This code is not giving error but i dont know why the "comp" value is always none. its not changing even through random module and its functions . please help me
'''
import random

def game(comp , player):
if player == comp:
return None
elif comp == "r":
if player == "s":
return False
elif player == "p":
return True
elif comp == "s":
if player == "p":
return False
elif player == "r":
return True
elif comp == "p":
if player == "r":
return False
elif player == "s":
return True

comp = print("Comp Turn: Rock , Papers, Scissors: ")
randNo = random.randint(1 , 3)
if randNo == 1:
comp == "r"
elif randNo == 2:
comp == "p"
elif randNo == 3:
comp == "s"

player = input("Your Turn: Rock(r) , Papers(p) , Scissors(s) : ")

result = game( comp , player)

print("Computer chose" , comp)
print("You chose`" , player)

if result == None:
print("The game is tied")
elif result:
print("You Won")
else:
print("You Lose")

'''
the "comp" value is showing none type, i want it to be str. i tried converting it but it not worked plzzz help masters. anyone professional here to help`'''

unable to play .wav files on MS Windows

I am unable to open these .wav files on multiple PCs, trying multiple Music players, e.g. VLC Media Player, Groove Music, Windows Media Player, ITunes, and following your speech recognition article for python.
Can you provide files that can be used on MS Windows out of the box?
Here is the Groove Music error message:

image

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.