|
@@ -8,16 +8,12 @@ class Houndify(OrderListener):
|
|
|
|
|
|
def __init__(self, callback=None, **kwargs):
|
|
|
"""
|
|
|
- Start recording the microphone and analyse audio with Houndify api
|
|
|
- :param callback: The callback function to call to send the text
|
|
|
- :param kwargs:
|
|
|
+ Start recording the microphone and analyse audio with Houndify api
|
|
|
+ :param callback: The callback function to call to send the text
|
|
|
+ :param kwargs:
|
|
|
"""
|
|
|
OrderListener.__init__(self)
|
|
|
|
|
|
- """
|
|
|
- Start recording the microphone
|
|
|
- :return:
|
|
|
- """
|
|
|
# callback function to call after the translation speech/tex
|
|
|
self.callback = callback
|
|
|
# obtain audio from the microphone
|
|
@@ -47,6 +43,11 @@ class Houndify(OrderListener):
|
|
|
Utils.print_danger("Could not request results from Houndify Speech Recognition service; {0}".format(e))
|
|
|
|
|
|
def _analyse_audio(self, audio):
|
|
|
+ """
|
|
|
+ Confirm the audio exists annd run it in a Callback
|
|
|
+ :param audio: the captured audio
|
|
|
+ """
|
|
|
+
|
|
|
# if self.main_controller is not None:
|
|
|
# self.main_controller.analyse_order(audio)
|
|
|
if self.callback is not None:
|