Coder Social home page Coder Social logo

api-to-speech's Introduction

API to Speech

An example to add speech responses to an API using Python, Flask and Pyvona

Installation

$ mkdir venv
$ export VENV='path_to_folder'/venv
$ virtualenv $VENV
$ . $VENV/bin/activate
$ $VENV/bin/pip install -U pyvona
$ $VENV/bin/pip install -U texttable
$ $VENV/bin/pip install -U flask
$ $VENV/bin/pip install -U duckduckgo2
$ $VENV/bin/pip install -U bleach

Configuration

Get an IVONA Speech Cloud Account and generate credentials: Access and Secret Key

Create configuration file config.cfg (or just edit and rename the config_example.cfg)

[main]
access_key = IVONA_ACCESS_KEY
secret_key = IVONA_SECRET_KEY

Run

$ $VENV/bin/python server.py

Open browser on printed URL, usually http://0.0.0.0:5000.

Usage

screenshot

  • Available Voices

    • Select the voice you want the results to be spoken with.
  • Speak

    • Turn on and off speech response
    • speak [ ]: audio feedback off
    • speak [:heavy_check_mark:]: audio feedback on
  • Results

    • The results will be showned here
  • Add Data

    • Will create an entry with the inputed text and return the generated ID.
    • Note: The result returned is always in english.
  • Get Data

    • Will get the data with the inputed ID (the inputed text) and show it in the Results and in the Edit Data sections.
    • Note: The result if nothing is found will be in english.
  • Edit Data

    • Will edit the data fetched via Get Data with the new inputed text.
    • Note: The result returned (success|fail) is always in english.
  • Delete Data

    • Will delete the data with the inputed ID.
    • Note: The result returned (success|fail) is always in english.
  • Capitalize

    • Will get a capitalized version of the inputed text.
  • Search

    • Will search for the inputed term using duckduck go API and get the first available response (text and a URL or just a URL).
    • Example: Weather in [city name]
  • Get Audio

    • Used to get an audio file with speech of the inputed text.
      • Request examples for command line using curl:
        • GET Request: will generate the curl GET command to get the audio file for the inputed text
        • POST Request: will generate the curl POST command to get the audio file for the inputed text

api-to-speech's People

Contributors

a31859 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.