GithubHelp home page GithubHelp logo

benoitfragit / google2ubuntu Goto Github PK

View Code? Open in Web Editor NEW
133.0 133.0 33.0 4.84 MB

1.1.5 publcation Nedd Translation

Home Page: https://plus.google.com/u/0/communities/103854623082229435165

Shell 3.12% Python 96.88%

google2ubuntu's People

Contributors

benoitfragit avatar ladios avatar lincus avatar tectas 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

google2ubuntu's Issues

Locale handling is wrong

You can't just cut the region code off and then replace it with upper cased language code.

For Chinese, there are Simplified Chinese - zh_CN and Traditional Chinese - zh_TW. There is no locale such as zh or zh_ZH. For Chinese in Hong Kong - zh_HK, the case is the worst. Normally we will set zh_TW as fallback written language. I am not familiar with Python's locale library, but you can get a list of fallback languages from the $LANGUAGE environment variable. And there are spoken languages. Most Hong Kong population speak Cantonese, for that we should pass zh_YUE to Google Speech Input/TTS, for Mandarin either of zh_HK, zh_CN or zh_TW is okay.

I found a list of supported language codes here:
http://stackoverflow.com/questions/14257598/what-are-language-codes-for-voice-recognition-languages-in-chromes-implementati

Recap:

  • All locales should be like ab_CD, falling back to ab is fine but not always valid.
  • Separate locale settings for both Speech Input and TTS are needed.

Spanish translation

I've started a spanish translation, but I don't know how to deal with "tilde" or other spanish specific accents. The spanish translation need some improvments

Unable to translate

Hey, im stil having a issue!

I already have a api key and all dependencies.
I was trying with all the solutions given to problems already registered, but keeps saying that it can not translate.

[SPANISH,DEV]

/usr/share/google2ubuntu$ ./google2ubuntu.py

/usr/share/google2ubuntu/resources/sound.wav:

File Size: 55.0k Bit Rate: 708k
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 22050Hz
Replaygain: off
Duration: 00:00:00.62

In:100% 00:00:00.62 [00:00:00.00] Out:13.7k [ -====|====- ] Clip:0
Done.
config file: /home/sk8/.config/google2ubuntu/google2ubuntu.xml

Some help please.

Time command returns 404: Not Found

Using Google2Ubuntu 1.1.4: I triggered the time command via "what time" and here's the terminal output:

/usr/share/google2ubuntu/google2ubuntu.py
/usr/share/google2ubuntu/resources/sound.wav:

 File Size: 55.0k     Bit Rate: 708k
  Encoding: Signed PCM    
  Channels: 2 @ 16-bit   
Samplerate: 22050Hz      
Replaygain: off         
  Duration: 00:00:00.62  

In:100%  00:00:00.62 [00:00:00.00] Out:13.7k [ -====|====- ]        Clip:0    
Done.
config file: /home/andrei/.config/google2ubuntu/google2ubuntu.xml
key internal
command time
it is 19 hour 34 minute
.HTTP Error 404: Not Found
False
play FAIL formats: can't open input file `/tmp/tts.mp3': 

At execution pause the music player

I have always opened the music player but for use this script i need to pause it and say the command.
i think that with dbus it's possible pause the music and start after the execution of the command.
In this way i set an hotkey for execute the script :-D

sh: -c: line 0: syntax error near unexpected token `&'

Hi

When I try to start certain commands, the commands get executed properly but in the console shows:

manuel@kobold /mnt/data/download/google2ubuntu $
(process:3195): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
./google2ubuntu.py

/mnt/data/download/google2ubuntu/resources/sound.wav:

File Size: 55.0k Bit Rate: 708k
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 22050Hz
Replaygain: off
Duration: 00:00:00.62

In:100% 00:00:00.62 [00:00:00.00] Out:13.7k [ | ] Clip:0
Done.
config file: /home/manuel/.config/google2ubuntu/google2ubuntu.xml
key extern
command firefox
True
sh: -c: line 0: syntax error near unexpected token &' sh: -c: line 0: &'

Firefox starts successfully but the error might be interfering with other programs.

I noticed this with these commands:

firefox
clementine -f
clementine -p
dolphin &> /dev/null

Just to inform you :-D

Otherwise this is great.

When using module, it shows error : Setup file missing

I am on Linux Mint 17.1. Whenever I tried using any of the module be it google or wikipedia or my own script, it was showing the error "Setup file missing".

The error can be temporarily fixed by commenting out the following line in the librairy/workWithModule.py file:

sentence = unicodedata.normalize('NFKD', sentence)

I will file a pull request for this, but I'm not much of an expert on this unicode stuff and am not confident if this is indeed the solution. Meanwhile, this is a temporary solution. I will look into it later.

Speed

It's possible set the time for the registration?
I speak the command in two seconds so 5 seconds it's annoying.

RPM version

I'm able to easily create an RPM package but I don't know if dependancies are the same on Fedora for example

Error: Setup file not found message

When I start:

manuel@kobold /mnt/data/download/google2ubuntu $ ./google2ubuntu.py -v

/mnt/data/download/google2ubuntu/resources/sound.wav:

File Size: 55.0k Bit Rate: 708k
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 22050Hz
Replaygain: off
Duration: 00:00:00.62

In:100% 00:00:00.62 [00:00:00.00] Out:13.7k [ | ] Clip:0
Done.
config file: /home/manuel/.config/google2ubuntu/google2ubuntu.xml

I say in german: öffne data, with should open dolphin in /mnt/data.

But instead I get as a notify message: record please speak, then i speak and then i get: Error: Setup file not found.

Nothing else happens. This also happens when i select EN as language.

Corrected german translation

Hello

I do not know how to contribute with git to the repo and if it is even possible if im not accepted as dev or something. So here is an update of the german translation.

I just saw some little flaws in the German translation of the LC_MESSAGES.
Mostly wrong upper and lower case and one time wrong translation of missing args was not correct

Here is a fixed one: http://pastebin.com/tWuQLALS

general python setup

Can someone make the general python install script so it can be installed in any linux at less?

Version 1.1.0: "Add" button stopped working, "Module setup" does nothing

I've upgraded to Google2Ubuntu 1.1.0 and the "Add" button stopped working. Here's the output when clicking the button:

/usr/share/google2ubuntu/librairy/add_window.py:39: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for model or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
treeview = Gtk.TreeView(self.tree_filter)

Also, the "Module setup" button doesn't work. Here's the command line output that's displayed when clicking that button:

Traceback (most recent call last):
File "/usr/share/google2ubuntu/librairy/add_window.py", line 436, in edit_clicked
iter = self.tree_filter.convert_iter_to_child_iter(iters)
TypeError: Argument 2 does not allow None as a value

Tested under Ubuntu 14.04 Trusty Tahr.

Russian translation

Someone on Google + asks me for a Russian translation. I've not the skills to do that. Moreover, I don't know how to deal with cyrillic letter.

G2U notification don't disappear

Hi, Benoit, for a long time that I wanted to report this but never got the opportunity. The notification that G2U is recording don't disappear after an application or window is open or closed.

captura de ecra de 2014-02-26 00 08 05

FeatureReq: Sort the commands in the list

It would be cool if it would be possible to sort the commands in the list.
By hand or automatic sorted by alphabet.

For example i got:

open webbroser
play music
close window
stopp music
open console

With this feature the user could make little "groups" of things like the "music group" with the music commands, then the open group with all commands who open things.

Like this:

open webbrowser

open console

play misc

stop music

close window

Error in Linux MInt 17

Hello, I'm using Linux Mint 17 and always returns the message: unable to translate.

Running with su:
gi._glib.GError: GDBus.Error: org.freedesktop.DBus.Error.ServiceUnknown

Open google2ubuntu to the domotic world

For the moment google2ubuntu can only be use to control 1 computer. I've talked with someone on th google+ page. He wanted to use google2ubuntu to controle some stuff in his home.

I don't know how work domotic because I never tried to do such thing and because I haven't got required equipments.

So at the beginning, I want "us" to bring user a way to execute command on others pc (clients). I mean now we can launch the listen.sh/listener.py in background and wait the user to talk. The idea is to provide a modified version of those programs in order to execute them in a distant machine. (My first idea was to use ssh)

So in th gui, in order to manage clients, we can create a window with some field:

  • host : client's name
  • ip adress : client's ip adress
  • a button do activate/deactivate recording on the client
  • A config file to use: The idea is to provide a different config file for each client

Remark: Each client will be able for example to shutdown the light of the room, so when the people say "shutdown the light" the action need to be different depending of the activated client

Github Collaborator

Hello

I'm student and in two weeks, I'm going to start a 6 month internship. I don't want the project to die. So, I'm looking for collaborators. People who will be able to manage issue, bring ideas, develop new tools.

If you are interested please post a little message here ...

Error message displayed by module load

When I load a module from a file, the error message: "Error select a file" is displayed after the file is selected and (sucessfully) loaded. This is just a cosmetic error I believe. See screenshot.
bug_open_module_file

this project is seemingly dead

ppa does not exist I need to install an older version of python for this to work I could not get this to work within five minutes of effort.

Error reading google2ubuntu.conf file

runing on Ubuntu 16.04.4 LTS x 64

after git clone i go to directory an execute

$ ./google2ubuntu.py
/opt/google2ubuntu/librairy/basicCommands.py:3: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
Error reading google2ubuntu.conf file

1.1.4: empty google2ubuntu-manager window

I've upgraded to version 1.1.4 in Ubuntu 14.04 and the googl2ubuntu-manager window is empty: the commands / hot-words are not displayed:

google2ubuntu-bug

Here's the terminal output displayed when running google2ubuntu-manager.py:

Error while reading config file
<type 'exceptions.AttributeError'>
("'NoneType' object has no attribute 'text'",)
'NoneType' object has no attribute 'text'
/usr/share/google2ubuntu/librairy/MainWindow.py:46: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label_main = Gtk.Label("main")
/usr/share/google2ubuntu/librairy/SetupWindow.py:27: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label1=Gtk.Label(_('Select your language'))
/usr/share/google2ubuntu/librairy/SetupWindow.py:31: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label2=Gtk.Label(_('Set the recording time (seconds)'))
/usr/share/google2ubuntu/librairy/SetupWindow.py:34: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label3=Gtk.Label(_("Set the music player's play command"))
/usr/share/google2ubuntu/librairy/SetupWindow.py:37: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label4=Gtk.Label(_("Set the music player's pause command"))
/usr/share/google2ubuntu/librairy/SetupWindow.py:40: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label5=Gtk.Label(_('Hotword mode'))
/usr/share/google2ubuntu/librairy/SetupWindow.py:43: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label6=Gtk.Label(_('Set the noise threshold'))
/usr/share/google2ubuntu/librairy/SetupWindow.py:46: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label7 = Gtk.Label(_('Set the hotword'))
/usr/share/google2ubuntu/librairy/MainWindow.py:48: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keywords for label or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
  label_config = Gtk.Label("config")

exo-open or xdg-open

A lot of the commands start with "exo-open" in Ubuntu 13.10 "xdg-open". also the option "--launch" does not appear to work with error message:
(
xdg-open: unexpected option '--launch'
Try 'xdg-open --help' for more information.
).

file: google2ubuntu / config / en_EN / default.xml

Wikipedia module

I have a preposition maybe wikipedia module should be changed to something like this ??

!/bin/bash

CONTENU="$1"
CONTENU=$(echo $CONTENU | sed "s/ /+/g")
xdg-open http://en.wikipedia.org/w/index.php?search="$CONTENU" &

exit 0

because I with the old version I could not us it and the

and maybe change Wikipédia to wikipedia because I think I do not think this software recognizes é letter

/tmp/g2u_dictation not cleaned up

If you wind up with /tmp/g2u_dictation existing, you get errors, at least in some cases. The rub is, nothing removes that directory, not even a "purge" remove with apt-get. If you don't know to clobber it manually, it stays in dictation mode which for some reason is not working for me.

Need a dialog to edit/add command

I can't switch ibus input method (using Alt+shift) when editing commands. Not sure why but it better to have text fields in a dialog for us to edit them. And if the command is an internal one, it would be nice to let us pick the options in a combo box. Also, the module setup can be merged into this command edit dialog.

MERGE ISSUE

There is an issue with merge. Ladios merge has been overwritted by an other merge.
Can you please make a new pull request (the same one)

Override language

Hello,

It'll be nice if you can add a feature to set a different language than the locales.

For example, my mothertongue is french but my system is configured in en_US.

Thanks for this great tool btw!

New version translation update

Hello all translators, I need you (again). I've made an update so translation must be update. This update introduce some new possibilities such as

  • pause/play media player (with your own commands)
  • set the recording time
  • A new window to setup google2ubuntu
  • button "try command" and "Module setup" removed when not usefull
  • Portuguese translation
  • Chinese translation
  • Improvements in locale management

So before the next release, some words have to be translated. The default.xml file havn't been changed so there is nothing to do in it. There is only 5 or 6 sentences to translate in google2ubuntu.po

best regards

@ladios
@tectas
@lincus
@Mte90

Ok Linux

try do do something with:

rec /tmp/recording.flac rate 16k silence 1 0.1 3% 1 3.0 3%

Debian support

When i execute the google2ubuntu.py i get this:

sh: 1: play: not found

After that i have spoken

Traceback (most recent call last):
  File "./google2ubuntu.py", line 19, in <module>
    g2u = interface()
  File "/home/mte90/Desktop/Prog/google2ubuntu/librairy/interface.py", line 42, in __init__
    self.sendto()    
  File "/home/mte90/Desktop/Prog/google2ubuntu/librairy/interface.py", line 50, in sendto
    f = open(filename)
IOError: [Errno 2] File or directory not exist: '/tmp/voix_18446.flac'

Can't start google2ubuntu from shortcut or command line

I was able to use the shortcut f9 before but after updating to latest version it doesn’t work. I get his from the command line :

/usr/share/google2ubuntu/google2ubuntu.py

** (google2ubuntu.py:10162): WARNING **: The connection is closed
Error reading google2ubuntu.conf file
root@tan:/home/yamu70#

Creating a Docker Image for setting up the development evn

What would be excellent would be to create a docker image for setting up the development env.
Its obvious that this code base is really old (google transalate api isused avaliable through web-calls any more). I would be advantageous to move this to use Google speech api (paid for by the user obviously)

Strange work of audio recording

When I run google2ubuntu,py it show something like this:
$ /usr/share/google2ubuntu/google2ubuntu.py

/usr/share/google2ubuntu/resources/sound.wav:

File Size: 55.0k Bit Rate: 708k
Encoding: Signed PCM
Channels: 2 @ 16-bit
Samplerate: 22050Hz
Replaygain: off
Duration: 00:00:00.62

In:100% 00:00:00.62 [00:00:00.00] Out:13.7k [ -====|====- ] Clip:0
Done.
config file: /usr/share/google2ubuntu/config/en_EN/default.xml

So I can see length of recording is less than a second. Why?

I use 1.1.4 version (saucy) on Linux Mint 16 MATE.

I tried to remove sound.wav, but it didn't help. Also, I get known that sound.wav is protected from writing. I reinstalled package. But problem is still exists.

Now I just get same notification with "unable to translate" message.

E: Unable to locate package google2ubuntu

I just tried to install on Ubuntu 14.10 following ppa instructions:

sudo add-apt-repository ppa:benoitfra/google2ubuntu
sudo apt-get update
sudo apt-get install google2ubuntu.

I get

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package google2ubuntu

because:

W: Failed to fetch http://ppa.launchpad.net/benoitfra/google2ubuntu/ubuntu/dists/utopic/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/benoitfra/google2ubuntu/ubuntu/dists/utopic/main/binary-i386/Packages 404 Not Found

Need translation before 1.1.4 release

The next release is ready to be publish with:

  • hotword mode
  • new edit/add window
  • new nl_NL language support
  • new plugin goto.py
  • new way to store module's configuration

Next release has to be updated.

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.