This tutorial will show you how to transcribe the audio from a file on your computer using dialogflow.
Follow the Getting started
You should now have the following set up at the end:
SIC is installed on your laptop
Redis is running on your laptop
Approach
This tutorial will show you how to convert audio to text. We’ll split this up into a couple parts
Converting the file to a
.wav
fileStarting the dialogflow component
Transcribing the audio file
Converting to wav
To be able to read the audio in python, its easiest to convert it to a .wav
file. Depending on which file type you have this might need to be done differently, but here is an example using ffmpeg.
ffmpeg -i my_audio.mp3 -acodec pcm_u8 -ar 44100 my_audio.wav
Installing and starting dialogflow
To start dialogflow, you will likely need to install additional packages. You can do this with
pip install -r sic_framework/services/dialogflow/requirements.txt
PyAudio needs to be installed, see https://pypi.org/project/PyAudio/ for information about your platform.
If everything went right, you should see something like
(base) user@laptop:~/framework/sic_framework/services/dialogflow$ python3 dialogflow_service.py [SICComponentManager 192.168.0.181]: INFO: Manager on device 192.168.0.181 starting [SICComponentManager 192.168.0.181]: INFO: Starting component manager on ip "192.168.0.181" with components: [SICComponentManager 192.168.0.181]: INFO: - DialogflowService
Getting a key
TODO link to page explaining how to set up dialogflow and get the key,