Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

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:

  1. SIC is installed on your laptop

  2. 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

  1. Converting the file to a .wav file

  2. Starting the dialogflow component

  3. 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

 Docker alternative for dialogflow

If you have trouble installing dialogflow locally, you can also try to start the component using docker. Make sure redis is not running anywhere else, and in the framework folder use

docker compose up dialogflow

Getting a key

TODO link to page explaining how to set up dialogflow and get the key,

  • No labels