speech_recognition icon indicating copy to clipboard operation
speech_recognition copied to clipboard

Fixes and improvements for `recognize_assemblyai()` method:

Open patrickloeber opened this issue 2 years ago • 0 comments

Hi, I made some fixes and improvements for the recognize_assemblyai() method, since it was only working with a file path before and didn't have correct error handling:

  • Adds support for AudioData instance. Before, it only worked with a path to a file
  • Adds more error handling
  • Removes inner read_file function since the requests module automatically handles chunking
  • Removes "content-type" from header since this is not needed
  • Adds docstring
  • Adds example code snippet in examples/audio_transcribe.py
  • Lists AssemblyAI in README

patrickloeber avatar Oct 20 '23 16:10 patrickloeber