Real-time Transcription Playground
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
Google Speech API
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
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_FILEto point to your file path
yarn installin the root directory
yarn startto start the frontend and
start-backendto run the backend