Giter VIP home page Giter VIP logo

python-sphinx-listen's Introduction

#Python-Listen ###Version 0.0.2 This project is still only in the early stages, but it aims to present an intuitive interface for background listening and speech to text using cumSphinx's gstreamer plugin on Linux.

  • See /source/sphinxwrap.py for module
  • See /source/sphinxwrap.pyc for precompiled module
  • See /source/basic demo.py for a demo

This module has only been tested on Ubuntu, but may work on other Linux distributions.

##Installation: (Un-tested, may need other dependencies)

  1. Ubuntu:
  • Install the following packages and all their dependencies: gstreamer0.10-pocketsphinx and pocketsphinx-hmm-en-hub4wsj
  • Download /source/sphinxwrap.py and include in program.
  • (Download the entire source if you want API documentation and sample code)

##Documentation: (Anything inside <> should be replaced)

To import the module:

  import sphinxwrap

To create an instance of the listener use:

  sphinxwrap.backgroundListener(<OPTIONAL: audio source, defaults to "alsasrc">)

To add a particular word to listen for use the add method:

  .add(<a word of type str>, <event callback>)
  # returns True is successful
  # raises ValueError if the word is not of type str
  # rasies ValueError if the callback cannot be called

To stop listening for a particular word use the remove method:

  .remove(<a word of type str>)
  # returns True is successful, False otherwise
  # raises ValueError if the word is not of type str

To start listening call the startListening method:

  .startListening()

To stop listening call the stopListening method:

  .stopListening()

##Licensing: Module is avalible under The Apache 2.0 License. Sample code is avalible under The MIT Licence.

python-sphinx-listen's People

Contributors

joshuajb avatar

Watchers

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