Coder Social home page Coder Social logo

tgivslife / real-time-transcription-with-google-speech-to-text-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from untilhamza/real-time-transcription-with-google-speech-to-text-api

0.0 0.0 0.0 433 KB

A simple app that demostrates how to use the google-speech-to-text API for real time transcription with react and node js

JavaScript 47.61% TypeScript 37.48% CSS 2.62% HTML 12.30%

real-time-transcription-with-google-speech-to-text-api's Introduction

Node.js and React Speech-to-Text Demo

This is a simple app that demonstrates how to use the Google Speech-to-Text API in a Node.js and React application.

Requirements

  • Node.js (tested with version 14.x)

  • React (tested with version 16.x)

  • Google Cloud Platform Service Account Key with Speech-to-text api permissions

    Follow this tutorial to create credentials and learn how to use the Google-Speech-To-Text API

Setup

  1. Clone this repository: git clone https://github.com/untilhamza/Real-time-transcription-with-Google-speech-to-text-API.git

Frontend part

  1. Navigate to the react-app project directory: cd stt-client
  2. Install dependencies: yarn
  3. Start the development server: yarn start
  4. Navigate back to the parent directory : cd..

The app will now be running at http://localhost:3000.

Add Credentials

  1. Make sure to get a Google cloud Service Account Key as shown in this tutorial
  2. Download the generated Service Account key json file save it to the server folder as speech-to-text-key.json.

    This file name is already added to the .gitignore file but make sure not to push to github or any public repositories

  3. Open the server folder and add this line in index.js file to add google credentials to our node js backend.
process.env.GOOGLE_APPLICATION_CREDENTIALS = "./speech-to-text-key.json"; //TODO: set this to the path for your Service account key JSON file

Backend part

  1. Navigate to the server project directory: cd server
  2. Install dependencies: yarn
  3. Start the development server: yarn run dev
  4. Start the development server: npm start

The backend listens at http://localhost:8081.

Usage

To use the app, simply click the "Start Recording" button and speak into your microphone. The transcription will appear on the screen as you speak, updating in real-time. When you're finished, click the "Stop Recording" button to see the final transcription.

Credits

This app was built by Hamza using the Google Speech-to-Text API.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

real-time-transcription-with-google-speech-to-text-api's People

Contributors

untilhamza avatar tgivslife avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.