How to change spencers language?

Hi folks,
I like Spencer a lot, but my grandchildren do not yet speak English.
Do you have any hints how to change Spencer’s language?
Thanks!

Hey, thank you for supporting our work.

I would appreciate it if you could leave an honest review of our products here:
https://www.trustpilot.com/review/circuitmess.com
Reviews help us make better products and reach more customers.

Unfortunately, there is no official way of changing Spencer’s language because we didn’t have the time and resources to translate it to different languages so far.

There is this unofficial code repository where Matjaž - a community forum member and Spnecer owner - translated his Spencer to Slovenian:
https://www.trustpilot.com/review/circuitmess.com

I didn’t try this myself and do not know how hard it is to get his code working, I am just pointing out that it exists

I think this might be the right link to the Slovenian language repo:

2 Likes

Thanks for pointing me there!

@Krischi @LadaF yeah, that’s the right link to the repo, sorry I accidentally posted the Trustpilot link twice

Thanks to Matjaž work, this is what I found out so far:

  • clone the original spencer firmware and library repo
  • in firmware:
    • translate the sentences.txt
    • change the language parameter in scripts/sentences.sh
  • in library:
    • change the speech to intent service to understand the other language
      • How to? I didn’t find a language parameter at src/Speech/SpeechToIntent.cpp . Maybe one would have to use the wit.ai services directly.
    • change the language parameter in the text to speech service, see src/Speech/TextToSpeech.cpp
  • compile and upload the firmware and library

While that would work for my own requirements, it would make me busy updating my cloned repo with updates of the original CircuitMess repo and it would end up with at least one repo per language. I think it would be much better to implement a build-in multi language support, so one could change Spencer’s language on the fly, like “Spencer, let’s switch to Esperanto.” - but that will be another discussion. First I try my translation to German.

  1. Start with Spencer talking in other language. Most of the things Spencers say, are pre-generated files stored on Spencer storage, generated from sentences.txt using sentences.sh. You need to upload this mp3s to Spencer storage using https://github.com/CircuitMess/SerialUploader
  2. For Spencer to understand other languages you need own speech to intent service.
    Default speech to intent service is for English. In my repo you can find a simple speech to intent using Azure speech services. It can be modified for Google service.
  3. TextToSpeech can be modified to other language, but first step is where most of the speech is (pre)generated.

Wit.ai is a great service and a next step on my todo, after integrating Spencer with smart house. :wink:
I can offer you some help, but running speech to intent service is not free.

2 Likes

Thanks for the explanations and especially for the hint with the mp3 uploading!
I realized, that the mp3 generation is not part of the firmware compilation but needs to be done with a manual run of the sentences.sh script. So far I was assuming the mp3 uploading would be part of the the firmware upload after the compilation. Anyway it makes much sense to have it as a separated step.

Regarding the speech to intent service at wit.ai I found this statement in there FAQs:

Wit is free, including for commercial use.

I also found the google text to speech is free for personal use and already have an API key for it. It is needed in the sentences.sh script but I will very likely use it also for some other ideas and improvements of Spencer’s communications.

Lets see how far I will get in the next days. Not much time unfortunately.