Search code examples
speech-recognitionspeech-to-textgoogle-speech-apigoogle-cloud-speech

Good tutorial for Google Cloud Speech API/Speech recognition on Mac/Python?


I am trying to use speech recognition for building a project, and as of now have had 0 luck doing so. When I try using the sample code provided from google: https://github.com/googleapis/python-speech/blob/master/samples/v1/speech_transcribe_sync.py I get an error FileNotFoundError: [Errno 2] No such file or directory: 'resources/brooklyn_bridge.raw' and I am not exactly sure where to find this file or what it is used for. Whenever I try using speech_recognition library I get the error OSError: [Errno -9999] Unanticipated host error.

Basically my goal is to make a chatbot where the chat bot speaks (have that part down), and then the user responds with speech which can be parsed. Thank you.


Solution

  • You probably just copied the one file. It's best to clone the whole repository. Then the script will also find the file. Otherwise you will find the file in the resource folder.