在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):benoitfragit/google2ubuntu开源软件地址(OpenSource Url):https://github.com/benoitfragit/google2ubuntu开源编程语言(OpenSource Language):Python 96.9%开源软件介绍(OpenSource Introduction):google2ubuntu#UPDATE I've updated google2ubuntu in order to be able to use the google web speech api v2. You need to request a key to google. #Presentation The aim of this project is to let you use the Google speech recognition API to control your linux computer. The project is developed in Python. google2ubuntu is a tool that I started 2 years ago. Unfortunatly, I was not able to do what I wanted because of a lack of time. So the project consists in 2 principal Python scripts:
The first one lets you send commands to Google and then execute some actions. The second one lets you manage all the commands. I've done huge efforts to make the program easy to install and easy to use. Besides, the program can be internationalize, for the moment, it is already available in French, English, Deutch, Spanish and Italian. Special thanksBefore I begin, I want to thank some of you that help me. ##Contributors
##Publication #Installation DependanciesFor the moment, dependancies are:
If you are installing google2ubuntu from source not from deb or from ppa, type this:
##Find the package google2ubuntu is available on Github on the release page and in my ppa. To install google2ubuntu
##First launch ###Main programs Once you have installed google2ubuntu, you can attribute a shortcut to those 2 Python scripts:
Moreover, if you search in the application's menu you will find two launchers, one for each of those programs. After that, you can launch google2ubuntu-manager.py in order to manage all commands. As you can see, google2ubuntu comes with several default commands. I will explain you how to manage and add commands. ###Basic configs Then you can configure google2ubuntu by clicking on the Setup button, that will open a window In this window you can:
For the last two parameters, as there is a lot of media player (vlc, mplayer, banshee, ...) I think this way is the most efficient because it lets anybody writing a basic shell script that will pause or play his favorite media player. So those commands could be shell commands or could be more elaborated scripts #Manage commands ##Commands' storage By default, google2ubuntu comes with several commands stored in a default xml file:
For the moment, there is a default file for French, English, Spanish, Deutch and Italian users, if your language is not currently supported the default voice will be English. At the first, launch, a module folder is created in:
The first time you add, modify or remove a command, your commands' configuration will be also stored in this folder in the file:
##Commands' description
A command is a pair of
The word
Don't care about capital letter, because the program automatically put the text in lowercase. I've implemented different types of command:
###External commands External commands are basically commands that you can run in your terminal:
If you want to add an external command, just click on the "Add" button. Then find the newline and replace "your key" by the key you want to associate to the command and replace "your command" by the action. ###Internal commands ####What are they ? Internal commands are commands that I've implemented in google2ubuntu, for the moment there is 3 internal commands:
If you want to add an internal command, open the little menu near the "Add" button and select "internal". Then replace "your key" by the "key" you will pronounce to call this command and replace "word" by one of those 5 actions' name. ####Some words about dictation mode The dictation mode let you type all word you pronouce. If you want to enter in the dictation mode use the dictation mode internal function. If you want to exit this mode just use the associated function. Dictation is not continue so you have to launch google2ubuntu for each sentence you want to type ###Modules In order to extand google2ubuntu very easily I've implemented a system of modules that lets developers adds their own scripts in google2ubuntu. Besides, all modules will receive the text that you pronounce in parameter ####Module's description A module is basically, an executable file that will receive some text in argument. each module embed its configuration in your configuration file. Two fields are recorded for each module:
So, the google module will be call with
####How to add a module If you want to add a script, the gui will help you to create one and will place the module in :
You can add a module by opening the menu near to the "Add" button then selecting the executable files of the module.
Yu can also simply drag&drop this executable on the treeview and the module will be automatically added. When you add a new module you don't have to modify the ####Already available google2ubuntu already comes with 6 modules:
Then if you say "go to gmail.com", a new web page is going to be open with gmail.com
The plugin will tell me that he is the actual president of the US ####Note for the user Perhaps, you will have to modify the linker field of those module by selecting the module and clicking on the edit button #Go Linux automation
Once you have personalized and take care about the commands already included in google2ubuntu, you can launch the recognition by launching A little sound is played and a notification tell you to speak. Then the notification show the result and the action associated to the text you have pronounced is played. #How-to contribute ##Design some modules If you want you can write a module that will be integrated in the Github page, the user will have to download it and will be able to use it ##Translate the app ###Translate the google2ubuntu core If you want to translate this app, you need first to download the project then unzip it and open a terminal and place yourself in the folder newly created. Then, be sure that all string that you want to translate are like that:
Then be sure, that there is this at the begenning of the file you want to translate (only needed for google2ubuntu.py, gogl2ubuntu-manager.py)
So, if you want to add a new language, you should type:
The 2 first line are optional and are usefull only there is no .pot file in the i18n/ folder. Then, open the
###Update the translation To update an existing translation, you have to do several actions:
Then translate new line and compile the
Share ideasYou can share ideas and contact me on the google+ comunauty: google2ubuntu DemonstrationDocumentation pageI've wrote a documentation page with Sphinx Documentation #Update Improvements |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论