...
Code Block |
---|
import json
import threading
import wave
import pyaudio
from sic_framework.core.message_python2 import AudioMessage
from sic_framework.services.dialogflow.dialogflow_service import DialogflowConf, GetIntentRequest, Dialogflow, \
StopListeningMessage, QueryResult, RecognitionResult |
To read the wave file we can use the python wave library. This will read the file as raw bytes, which is what dialogflow will expect from us.
...