Skip to content

Speech to text and translation client-server using Google cloud

Notifications You must be signed in to change notification settings

hagarz/Speech-to-text-translator

Repository files navigation

Speech to Text Translator for Client-Server

Client uses PyAudio to stream audio to server.
Server converts audio stream to text using GCP Speech-to-Text and translats it using Google Cloud Translation.

The software has only been tested in Python3.6.

Prerequisites

  1. Follow the the instructions in Google Cloud documentation The JSON file you downloaded the the end of above instructions contains your key, GOOGLE_APPLICATION_CREDENTIALS

  2. Copy full file path (examle: C:\Users\yourname\Documents\subfoldername\google-app-credentials.json) to servers code line 20

    example:

    credential_path = r"C:\Users\yourname\Documents\subfoldername\google-app-credentials.json"

  3. If not run locally, HOST should be '0.0.0.0'.