Comments (21)
(Based on the feedbacks given in this thread.)
cd /home/pi/AIY-projects-python
cp src/examples/voice/assistant_grpc_demo.py src/examples/voice/assistant_grpc_demo_fr.py
Edit
src/examples/voice/assistant_grpc_demo_fr.py
Between
status_ui.status('starting')
assistant = aiy.assistant.grpc.get_assistant()
Add
status_ui.status('starting') aiy.i18n.set_language_code('fr-FR') assistant = aiy.assistant.grpc.get_assistant()
from aiyprojects-raspbian.
@yonisolo gRPC assistant demo allows to set --language
command line parameter. Language code must be from this https://developers.google.com/assistant/sdk/reference/library/languages list. Old aiy.i18n.set_language_code
API is already removed.
from aiyprojects-raspbian.
Hi Anne Romane.
French is currently not supported on the Google Assistant API, but it will come in the future. We don't have a release date yet.
If you only want to do voice commands, you can do that with the Cloud Speech API (but it won't have Assistant responses)
from aiyprojects-raspbian.
Closing, as this is an issue in the backend.
As @alfongj says, if you use the Cloud Speech API (instructions) and change the language in ~/.config/voice-recognizer.ini
you can create your own French voice commands. If you'd like, you could create a file fr.po
alongside de.po (instructions). Then, you could translate the existing commands to French, and send us a pull request so other users get this.
from aiyprojects-raspbian.
Hello,
With new release of project , voici-recognizer.ini don't exist ? How do set up french language on last version AIY project ?
from aiyprojects-raspbian.
@chris777c in your code use this setting
aiy.i18n.set_language_code('language code') so for french
aiy.i18n.set_language_code('fr-FR')
alternatively you can set it each time you use aiy.audio.say
aiy.audio.say("I ran the script", lang='fr-FR')
from aiyprojects-raspbian.
Thank you
from aiyprojects-raspbian.
@sheridat that's exactly what i've been looking for since weeks
from aiyprojects-raspbian.
@yonisolo Hi things have moved on a bit. The latest version of the assistant can speak more languages.
If your on the voicekit branch - i believe it has been updated to speak other languages
In time the aiyprojects branch will be updated
I don't need the capability - see #235 (comment) which has some more info.
from aiyprojects-raspbian.
Hello,
I reopen subject because the 235 post speak "dirty solution". Does it exist a good solution for setup french assitant in AIY projet ?
from aiyprojects-raspbian.
@chris777c Give it a try with the latest image. Using the Assistant Library, you can change the language with the Google Assistant app. Using the Assistant Service (assistant_grpc_demo.py) you can change the language with the app or with aiy.i18n.set_language_code('fr-FR')
.
Let us know how that works out for you!
from aiyprojects-raspbian.
Hello drigz, how to install the "latest image" on AIY already install ?
from aiyprojects-raspbian.
Hi @drigz and @sheridat : I reckon you managed to use the Google Assistant in French (speech and recognition). Is this correct ? I searched everywhere to get it to work (RPi3 and Google AIY Kit, no android phone), but I feel like I'm missing something...
Can you try and make an updated step-by-step, with the right branch to use ?
from aiyprojects-raspbian.
Thanks @gabrielklein ! I tried this before, but maybe too late in the script so it kept speaking English. My workaround for now has been to re-install the whole project using the provided image.
I think the "Hacking.md" way is really obsolete, so I was missing some steps or some new versions of something...
I will try again later on, and let you know if it works.
from aiyprojects-raspbian.
Hi there :)
I tried this weekend, and nope it doesn't work, it seems that the way the set_language is implemented is not very clear...
However, i saw some quest challenge to test with grpc but i didn't have time to...
please see: googlesamples/assistant-sdk-python#146
and stackoverflow
for details about it!
I'll give it a try later if nobody tried before.
Thanks for keeping this thread open everybody!!!
from aiyprojects-raspbian.
@chris777c Using the Assistant Library, you can change the language with the Google Assistant app.
How do you manage to do this?
I want to modify the language forassistant_library_with_button_demo.py
from aiyprojects-raspbian.
I sent an email to the aiy project support and they answered me:
Thank you for your interest into AIY projects.
Please refer : https://developers.google.com/assistant/sdk/reference/library/languages to know what all
languages are supported by Assistant grpc demo.
You can read about python APIs to change the laguage at : https://aiyprojects.withgoogle.com/voice /#makers-guide-python-api-reference
from aiyprojects-raspbian.
Please take a look at the docs: https://aiyprojects.readthedocs.io/en/latest/aiy.assistant.html#module-aiy.assistant.library. There is a langauge_code
parameter. You should use the latest SD card image from https://github.com/google/aiyprojects-raspbian/releases
from aiyprojects-raspbian.
Hi @dmitriykovalev, thank you for your reply, that's really great!!
Some time ago I tried with this code parameters, and it didn't worked at all.
The best i managed to get is speak in french and answered in english, after numbers of tries and without knowing exactly what I did to get it...
Did something change about it in the last Image?
This language problem is so dark where it should be easy...
I tried with this piece of code:
aiy.i18n.set_language_code('fr-FR')
assistant = aiy.assistant.grpc.get_assistant()
Is there any way to get an example in the repository with changed language code?
from aiyprojects-raspbian.
@dmitriykovalev that's a great news!!! I'll give it a try and post my result
from aiyprojects-raspbian.
For library, you have to connect a Google Assistant App with a smartphone (with the same account as on the device) to your device. And then modify the language with this App (tested and works on assistant_library_with_button_demo.py).
For other scripts, just add --language
(i.e. fr-FR) to the command line when you launch your script.
from aiyprojects-raspbian.
Related Issues (20)
- AIY python package version HOT 2
- GET request in Robot framework using AWS credentials HOT 4
- say and play_wav failing after invoking CloudSpeechClient client.recognize method
- AYI-vision: Unit joy_dection_demo.service could not be found HOT 3
- AIY-voice: problems encountered by assistant_grpc_demo.py after some time of use HOT 3
- Python package install fails on raspbian
- aiy-python-wheels fails to get installed on raspbian bullseye on rpi4 HOT 4
- Pico TTS not installable (Bullseye)
- Voice Bonnet drivers not installed (HACKING.md instructions) HOT 1
- No sound input/output on Raspbian Bullseye HOT 1
- Huge delay in voice recording. HOT 1
- 500 error code HOT 3
- No microphone as user Pi on version 20210402
- Not working with Raspbian Bullseye HOT 1
- Voice Bonnet not working with Pi 4 HOT 1
- Pi Zero 2 W?
- Voice Kit Google - Failed (src/examples/voice/assistant_grpc_demo.py)
- post-installation script subprocess returned error exit status 6 HOT 3
- Voice kit google (/lib/arm-linux-gnueabihf/libc.so.6: version 'GLIBC_2.34' not found (required by /lib/arm-linux-gnueabihf/libgcc_s.so.1))
- Sound driver for AIY Voice Kit V1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiyprojects-raspbian.