GithubHelp home page GithubHelp logo

ajbogh / blather Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 9.0 322 KB

Python application for speech recognition using pocketsphinx and gstreamer. A GUI is available for both Qt and Gtk.

Python 94.51% Shell 5.49%

blather's People

Contributors

ajbogh avatar chapma26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

blather's Issues

Keyword does not need to be spoken when -k is 0

When using -k 0 , 1 ,2 (any low value) (or not using -k at all), I find I can execute the default "email" command, and any other command, without using the keyword. This issue is easily reproducible. This is with the current commit. Any advice or guidance to fix that would be appreciated.

Keyword not found

The commands.tmp says:

# This keyword is like "Hal", or "Jarvis", or "Computer", you must say it to activate the system.
Hal:keyword

So I made a keyword

Raspberry:keyword

But when I say the keyword, the console writes:

keyword
/bin/sh: 1: keyword: not found

update from python2 to python3

I saw this request by @piegamesde in #17

I'd be interested in starting to update the py files to be compatible with python3. If I get stuck, can I do a PR and get some help along the way?

autoaudiosrc not found

Hi.

I have startup error:

 ./Blather.py
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
# commands are key:value pairs 

# key is the sentence to listen for

# value is the command to run when the key is spoken

hello world:echo "hello world"

hello world echo "hello world"
Traceback (most recent call last):
  File "./Blather.py", line 286, in <module>
    blather = Blather(options)
  File "./Blather.py", line 49, in __init__
    self.recognizer = Recognizer(lang_file, dic_file, opts.microphone )
  File "/home/shura/projects/blather/Recognizer.py", line 29, in __init__
    self.pipeline=gst.parse_launch( cmd )
glib.GError: no element "autoaudiosrc"

libgstpocketsphinx.so is instlled.

$ ls /usr/lib64/gstreamer-0.10
gst-plugin-scanner*     libgstaudiorate.so*      libgstdecodebin.so*         libgstgio.so*           libgstpulse.so*     libgsttypefindfunctions.so*  libgstvorbis.so*
libgstadder.so*         libgstaudioresample.so*  libgstdecodebin2.so*        libgstogg.so*           libgstpython.so*    libgstvideorate.so*          libgstximagesink.so*
libgstalsa.so*          libgstaudiotestsrc.so*   libgstencodebin.so*         libgstpango.so*         libgstsubparse.so*  libgstvideoscale.so*         libgstxvimagesink.so*
libgstapp.so*           libgstcoreelements.so*   libgstffmpegcolorspace.so*  libgstplaybin.so*       libgsttcp.so*       libgstvideotestsrc.so*
libgstaudioconvert.so*  libgstcoreindexers.so*   libgstgdp.so*               libgstpocketsphinx.so*  libgsttheora.so*    libgstvolume.so*

How to fix it?

Update code to use gstreamer 1.0

This program is the best of its kinds but will not work after updating to new stable Debian based distributions (Debian, Ubuntu, Linux mint..yada yada yada) as they now use a newer gstreamer plugin. Im no developer and there may be ways of creating a soft link with the proper parameters but i have yet to figure out what that would be. This program is the only one i have found that allows you to add your own canned trigger sentences and then input the code you want executed. I used it for 2 years and It worked flawlessly because you can be very specific about what it should listen to. Because of this it is very helpful for people with disabilities and just need the computer to perform certain issues...simple stuff like "play music" , "next track" ...or "open tonight's entertainment". If i can help out with getting this program updated please let me know.

bash scripts

Maybe I'm missing something obvious, but it appears to be calling all my bash scripts with sh as an interpreter. Is this configurable?

Automate installation for steps 3-5

I believe that the following steps in the README have been automated. The Bonus section in the README references a language_updater.sh file which seems to perform the steps. We should remove the steps and only reference the language_updater.sh file as the best option.

Reference README:

  1. go to http://www.speech.cs.cmu.edu/tools/lmtool.html and upload the sentences.corpus file
  2. download the resulting XXXX.lm file to the ~/.config/blather/language directory and rename to file to 'lm'
  3. download the resulting XXXX.dic file to the ~/.config/blather/language directory and rename to file to 'dic'

Bonus

once the sentences.corpus file has been created, run the language_updater.sh script to automate the process of creating and downloading language files

Improvement: Create standalone language model generator, stop using CMU online.

Currently we use the CMU website to generate our language file. We would like to include the necessary files that can generate the language file from within Blather instead. This will allow the system to be standalone and work without internet connection, as well as give us the ability to import large text files for language processing to improve Blather's speech recogniton.

Improvement: Timed keyword activation

Currently the keyword must be spoken before every command:

"Blather open email"
"Blather delete message"
"Blather empty trash"

During continuous listening mode there should be a time period for certain commands, or all commands, where you can say the keyword on the first command and have it continue to process commands for a total of 1 minute (for example) without having to say the keyword again.

"Blather open email"
"delete message" (after 10 seconds)
"empty trash" (before 1 minute)
"Blather close email" (after 1 minute)

Additionally there should be a phrase that returns the system to requiring a keyword or to dynamically switching the keywordless mode on and off.

Improvement: GTK: Utilize appindicator to create a notification icon for Ubuntu

Blather needs a notification icon that contains:

  • a "Listen" option which works off the Listen button state.
  • a "Continuous Listen" checkbox which, when activated, disables the "Listen" option and sets Blather to continuous mode. When unchecked it should stop Blather from listening and enable the "Listen" option.
  • an Exit option.

The notification area icon should be icon.png under the data directory.

In the future we may add additional code to detect OS type and use other notification area classes, but for now we can focus on Ubuntu with appindicator.

Improvement: Automatic language update/command read

Create a method to automatically read the commands.conf file's modified time and update the language file when it has changed, executing the read_commands function when the language file update is complete.

Process:

  • Start Blather, reads filemtime, keeps time in memory
  • User modifies commands.conf
  • Timed event re-reads filemtime, notices change
  • Blather automatically executes language updater script
  • Blather runs read_commands function

Improvement: Subtasks

Blather should be able to use certain key phrases after a parent phrase has been spoken. If there was a parent phrase of "Microwave" and a subtask of "reheat" then the subtask should only become available after speaking the parent phrase.

After a certain period of time the system can return to the top level so that all commands are available again.

Examples:

Refrigerator

  • water
  • ice
  • light

Microwave

  • reheat
  • one minute
  • two minutes
  • popcorn
  • light

The only time water or reheat should be available is if the user spoke the words "Refrigerator" or "Microwave" first, otherwise a smart refrigerator could be dispense water all over the floor when it misinterpreted room noise. The light action is shared between both examples but only the one within the active parent would work for a set period of time (30 seconds for example).

A key phrase could be used to return the system back to the parent level ("return to home").

Blather should detect Qt or GTK automatically

In the README step 6 indicates that for GTK you should use the -g flag and for Qt you should use the -q flag. It seems like it should be able to detect the environment and choose the appropriate mode by itself.

  1. run Blather.py
  • for Qt GUI, run Blather.py -i q
  • for Gtk GUI, run Blather.py -i g

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.