/2021_Shellhacks_Hearandlisten

This project is a simple tool, that does voice recognition, translates it in a language to choose and prints the translated output.

Primary LanguageJupyter Notebook

2021 Shellhacks: Hearandlisten

Shellhacks: Productivity Booster with Google Cloud.

This project is a simple tool, that does voice recognition, translates it in a language to choose and prints the translated output.

Overview

.
├── app.py
├── hearandlisten-da50cb4c59a8.json
├── backend
│   ├── __init__.py
│   ├── jobs.mp3
│   ├── main.py
│   ├── play_sound.py
│   ├── speech2text.py
│   ├── text2speech.py
│   ├── translate.py
├── README.md
├── requirements.txt
├── static
│   └── styles
│       └── index.css
├── templates
    └── index.html

Backend

  • Python
  • Google Cloud API
    • Cloud Speech-to-Text API from google.cloud import speech
    • Cloud Translation API from google.cloud import translate_v2 as translate
    • Cloud Text-to-Speech API from google.cloud import texttospeech
  • Flask

Frontend

  • very basic HTML & CSS

Screenshots

Step 1: Load page

1

Step 2: Choose file and language

2

Step 3: Get the results

3

Installed packages:

pip install flask
pip install google-cloud-speech
pip install google-cloud-translate
pip install google-cloud-texttospeech
pip install SpeechRecognition

See also the requirements file.

Setup of the Google Cloud Platform

https://console.cloud.google.com/ → register

create new project

  • new project → enter project name
  • create credentials
    • speech2text api
    • create keys → keys → add key → JSON → download and store it secure

add needed API's

  • Cloud Speech-to-Text API from google.cloud import speech
  • Cloud Translation API from google.cloud import translate_v2 as translate
  • Cloud Text-to-Speech API from google.cloud import texttospeech