Skip to content

Instantly share code, notes, and snippets.

@maverickagm
maverickagm / wit.patch
Created July 28, 2015 03:22
wit.ai backend patch for speech_recognition
--- a/__init__.py 2015-07-27 20:12:31.047928942 -0700
+++ b/__init__.py 2015-07-27 20:11:29.387931799 -0700
@@ -140,6 +140,23 @@
self.dynamic_energy_ratio = 1.5
self.pause_threshold = 0.8 # seconds of quiet time before a phrase is considered complete
self.quiet_duration = 0.5 # amount of quiet time to keep on both sides of the recording
+ self.stt_engine = 'google'
+
+ def samples_to_wav(self, source, frame_data):
+ assert isinstance(source, AudioSource), "Source must be an audio source"