Git Product home page Git Product logo

Comments (21)

gabrielklein avatar gabrielklein commented on April 28, 2024 1

(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.

dmitriykovalev avatar dmitriykovalev commented on April 28, 2024 1

@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.

alfongj avatar alfongj commented on April 28, 2024

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.

drigz avatar drigz commented on April 28, 2024

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.

chris777c avatar chris777c commented on April 28, 2024

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.

sheridat avatar sheridat commented on April 28, 2024

@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.

chris777c avatar chris777c commented on April 28, 2024

Thank you

from aiyprojects-raspbian.

yonisolo avatar yonisolo commented on April 28, 2024

@sheridat that's exactly what i've been looking for since weeks

from aiyprojects-raspbian.

sheridat avatar sheridat commented on April 28, 2024

@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.

chris777c avatar chris777c commented on April 28, 2024

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.

drigz avatar drigz commented on April 28, 2024

@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.

chris777c avatar chris777c commented on April 28, 2024

Hello drigz, how to install the "latest image" on AIY already install ?

from aiyprojects-raspbian.

Jaxom99 avatar Jaxom99 commented on April 28, 2024

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.

Jaxom99 avatar Jaxom99 commented on April 28, 2024

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.

yonisolo avatar yonisolo commented on April 28, 2024

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.

fabbbbb avatar fabbbbb commented on April 28, 2024

@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.

yonisolo avatar yonisolo commented on April 28, 2024

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.

dmitriykovalev avatar dmitriykovalev commented on April 28, 2024

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.

yonisolo avatar yonisolo commented on April 28, 2024

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.

yonisolo avatar yonisolo commented on April 28, 2024

@dmitriykovalev that's a great news!!! I'll give it a try and post my result

from aiyprojects-raspbian.

fabbbbb avatar fabbbbb commented on April 28, 2024

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)

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.