This project packages speech recognition applications :
-
speech-recognition-open-api - Converts speech into text using an API powered by deep learning neural network algorithms for automatic speech recognition (ASR). To know more, Click Here
-
speech-recognition-open-api-proxy - This project is a proxy to provide support for real-time streaming functionality for Open Speech API from browsers or any clients that doesn't support gprc bi-directional streaming. Refer the real-time streaming documentation for architecture details here
- clone the repo.
git clone git@github.com:amankrayush/speech-assistant-distro.git
- download model for languages (To recognize speech and convert it into text for particular language)
sh ./scripts/download_models.sh "english hindi"
- update the network name in docker-compose.yml file as per your requirement.
networks:
default:
name: bahmni-docker_default
external: true
Note :
- Speech Assistant application is intergrated with Bahmni, that's why network name is mentioned as 'bahmni-docker_default'
- Remove the networks field if you don't need external network.
- If external network is required, update it with external network name and it should present in the docker.
- make applications up (make sure models are available - mentioned in step 2)
docker-compose up -d
-
speech streaming functionality will be served by vakyansh proxy server which is exposed at 9009 port.
-
To pass a request from frontend proxy server to vakyansh proxy server, read this
- For Apache HTTPD server, put below lines:
RewriteEngine on RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] Header set Content-Security-Policy upgrade-insecure-requests RewriteRule ^/?(.*) "ws://vakyansh-proxy:9009/$1" [P,L]
example:
<VirtualHost *:<port number>> RewriteEngine on RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] Header set Content-Security-Policy upgrade-insecure-requests RewriteRule ^/?(.*) "ws://vakyansh-proxy:9009/$1" [P,L] </VirtualHost>