A real-time transcription project using React and a socketio python server. The goal of this project is to enable developers to create web demos and speech2text prototypes with just a few lines of code. Examples can be medical dictation apps, a note-taking CRM for entrepreneurs, etc.
Currently only supports real-time transcription using Google Cloud Speech
Real-time.transcription.demo.mp4
- Python 3 instructions
yarn
instructions
The code assumes an environment variable GOOGLE_SERVICE_JSON_FILE
that points to a valid GCP service account file.
If you need to get a service account:
- Within your Google Cloud console, create or select a project
- Enable the Cloud Speech API for that project
- Create a service account
- Download a private key as JSON
More info in Google Cloud's docs here and here.
Then, set the environment variable GOOGLE_SERVICE_JSON_FILE
to the path of the JSON file containing your service account key, e.g. /users/sahar/documents/sample-project-3c1a5892b00e.json
. Further details can be found in this Medium article.
- Clone or fork this repository
- Create a virtual environment in the root directory:
python -m venv $ENV_NAME
- Activate the virtual environment:
source $ENV_NAME/bin/activate
(for MacOS, Unix, or Linux users) or.\ENV_NAME\Scripts\activate
(for Windows users) - Install requirements:
pip install -r backend/requirements.txt
- Set your environment variable
GOOGLE_SERVICE_JSON_FILE
to point to your file path - Run
yarn install
in the root directory - Run
yarn start
to start the frontend andstart-backend
to run the backend