Giter Site home page Giter Site logo

python-speech-translate's Introduction

Python-Speech-Translate

This sample requires a subscription with Microsoft Translator Speech Translation API, which is part of Microsoft Azure Cognitive Services. Visit the Speech Translation API documentation page to get started.

Setup

Samples are written for Python 2 and assume that pip is installed. Recent versions of Python 2.7 come with pip.

The requests and websocket-client packages are required:

pip install requests
pip install websocket-client

Getting list of supported languages (languages.py)

This sample demonstrates how to obtain the list of languages supported by the Speech Translation API.

Run the example with:

python languages.py

Audio file translate (speech.py)

This sample demonstrates the use of Microsoft Translator Speech Translation API by translating an audio file.

Before running the example.

  1. Fill your Azure Data Market Credentials

    client_secret = 'INSERT YOUR CLIENT SECRET'

  2. Fill in the name of your audio file (PCM, 16 bit, 16 kHz, mono, WAV)

    audio_file = 'INSERT AUDIO FILE FULL PATH'

Run the example with:

python speech.py

Realtime speech translate (main.py)

This sample demonstrates the use of Microsoft Translator Speech Translation API

Before running the example.

  1. Fill your Azure Data Market Credentials

    client_secret = 'INSERT YOUR CLIENT SECRET'

Run the example with:

pip install https://github.com/xiongyihui/python-webrtc-audio-processing/archive/master.zip
pip install https://github.com/voice-engine/voice-engine/archive/master.zip
pip install pixel-ring
python main.py

python-speech-translate's People

Contributors

alexhcheng avatar xiongyihui avatar cpoulain avatar kellyaltom avatar

Watchers

James Cloos 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.