benoitfragit / google2ubuntu Goto Github PK
View Code? Open in Web Editor NEW1.1.5 publcation Nedd Translation
Home Page: https://plus.google.com/u/0/communities/103854623082229435165
1.1.5 publcation Nedd Translation
Home Page: https://plus.google.com/u/0/communities/103854623082229435165
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:
ab_CD
, falling back to ab
is fine but not always valid.Everything is in the tilte
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
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.
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':
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
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.
I can't install on ubuntu 18.04.
I get the following message while updating.
E: The repository 'http://ppa.launchpad.net/benoitfra/google2ubuntu/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
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.
It's possible set the time for the registration?
I speak the command in two seconds so 5 seconds it's annoying.
I'm able to easily create an RPM package but I don't know if dependancies are the same on Fedora for example
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.
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
Can someone make the general python install script so it can be installed in any linux at less?
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.
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.
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
play misc
close window
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
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:
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
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 ...
it's possible support other languages then english and francais?
Hi,
The entry to start the mailreader is not present in the afore mentioned file
Cheers Frank
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.
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
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:
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")
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
I have a preposition maybe wikipedia module should be changed to something like this ??
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
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.
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.
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)
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!
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
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
try do do something with:
rec /tmp/recording.flac rate 16k silence 1 0.1 3% 1 3.0 3%
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'
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 :
** (google2ubuntu.py:10162): WARNING **: The connection is closed
Error reading google2ubuntu.conf file
root@tan:/home/yamu70#
OS: elementary OS Luna (based on Ubuntu 12.04) - 32bit
issue: unresolved dependency python-urllib3
version: latest build v1.1.0
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)
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.
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
The next release is ready to be publish with:
Next release has to be updated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.