The STT dockerized backend for English and Kinyarwanda
Digital Umuganda STT english and Kinyarwanda backend
===================
A dockerized demo of Deepspeech Keyword spotter and transcriber
Getting started
~~~~~~~~~~~~~~~
Below are instructions to run the backend in Docker.
1. Clone the repository to your local machine and change directory to `kinyarwanda-stt-demo-backend.git`
.. code-block:: console
$ docker network create infrastructure_default
$ git clone
github.com
$ cd kinyarwanda-stt-demo-backend.git
2. Build the docker environment (assuming that docker and docker-compose is installed your machine).
.. code-block:: console
$ docker-compose build
3. Start the containers, this will start the DeepSpeech english and kinyarwanda containers and the postgres database.
.. code-block:: console
$ docker-compose up -d
4. Log in to the postgres docker compose and create the table user
.. code-block:: console
$ docker exec -it psql -U forrest -d deepspeechapi -W
$ CREATE TABLE users (id serial PRIMARY KEY, username VARCHAR ( 127 ) UNIQUE NOT NULL, email VARCHAR ( 127 ) UNIQUE NOT NULL,password VARCHAR ( 255 ) NOT NULL,created_at TIMESTAMP NOT NULL,modified_at TIMESTAMP);
5. Access the servers, Note for `Kinyarwanda you access via localhost:8000` and `English via localhost:8001`
Usage
~~~~~
Register a new user and request a new `JWT`_ token to access the API
.. _JWT:
jwt.io
.. code-block:: console
$ curl -X POST \
0.0.0.0 \
-H 'Content-Type: application/json' \
-d '{
"username": "forrestgump",
"email": "fgump@yourdomain.com",
"password": "yourpassword"
}'
API response
.. code-block:: json
{
"message": "User forrestgump is successfully created."
}
To generate a JWT token to access the API
.. code-block:: console
$ curl -X POST \
0.0.0.0 \
-H 'Content-Type: application/json' \
-d '{
"username": "forrestgump",
"password": "yourpassword"
}'
If both steps are done correctly, you should get a to …