Speech Recognition on ODROID

Share here your ideas for new projects
nshmyrev
Posts: 47
Joined: Sat Dec 12, 2020 10:14 pm
languages_spoken: english
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Speech Recognition on ODROID

Post by nshmyrev »

> is CUDA GPU is necessary to install TensorSpeech?

Not really, you can edit setup.py and change tensorflow-gpu to tensorflow. You can get tensorflow 2.3.1 wheel here:

https://github.com/bitsy-ai/tensorflow-arm-bin/

You also need to compile cpptflite, for that you just build tflite according to instructions on their website:

https://www.tensorflow.org/lite/guide/b ... _with_make

That almost works here, the only remaining problem is for tensorflow-addons for me, still looking on it.

nshmyrev
Posts: 47
Joined: Sat Dec 12, 2020 10:14 pm
languages_spoken: english
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Speech Recognition on ODROID

Post by nshmyrev »

Ok, with the attached file you can get going without addons. They need to make separate python preprocessor though without tensorflow dependency.

You can get precompiled binary, the patch, instruction and audio sample here:

https://alphacephei.com/tts/tensorflow-tts-pi.zip

nshmyrev
Posts: 47
Joined: Sat Dec 12, 2020 10:14 pm
languages_spoken: english
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Speech Recognition on ODROID

Post by nshmyrev »

On RPi3 it is 2 times slower than realtime though, not very practical still. Vocoder takes most of the time

Maybe it is worth to wait a bit more.

n2fan
Posts: 18
Joined: Fri Jan 08, 2021 6:47 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Speech Recognition on ODROID

Post by n2fan »

many thanks; I will try and provide the results
nshmyrev wrote:
Thu Jan 28, 2021 5:33 am
On RPi3 it is 2 times slower than realtime though, not very practical still. Vocoder takes most of the time

Maybe it is worth to wait a bit more.

User avatar
joerg
Posts: 1343
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 86 times
Been thanked: 193 times
Contact:

Re: Speech Recognition on ODROID

Post by joerg »

I have now a setup with rhasspy running, where my N1 with debian bullseye is base station and the C1 is slave station. This way the main work for dialog managment, intent handling, stt and tts is done by the N1.
On the C1 as can be seen in my thread I managed to output audio via spdif on pin 7 GPIOY_3. Now I need a small spdif to analog converter to feed speakers.
On the C1 is enabled the audio recording, the wake word with snowbird and the audio output. The communication is going with mqtt hermes protocol.
I was not able to install rhasspy in a venv environment on the N1 with bullseye, due to missing python 3.7 dependencies. But in a docker container it's running.

L67GS
Posts: 458
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 136 times
Been thanked: 66 times
Contact:

Re: Speech Recognition on ODROID

Post by L67GS »

I'm still having trouble with the microphone. Sometimes it just doesn't accept having modules module passed to it.
I wrote a little IF statement in my .bashrc to start pulse and load modules too. Even adding them command line doesn't always work.

nshmyrev
Posts: 47
Joined: Sat Dec 12, 2020 10:14 pm
languages_spoken: english
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Speech Recognition on ODROID

Post by nshmyrev »

L67GS wrote:
Mon Feb 01, 2021 2:56 am
I'm still having trouble with the microphone. Sometimes it just doesn't accept having modules module passed to it.
I wrote a little IF statement in my .bashrc to start pulse and load modules too. Even adding them command line doesn't always work.
Pulseaudio is not really necessary, you can simply configure alsa, it should be enough.

L67GS
Posts: 458
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 136 times
Been thanked: 66 times
Contact:

Re: Speech Recognition on ODROID

Post by L67GS »

nshmyrev wrote:
Mon Feb 01, 2021 3:55 am
L67GS wrote:
Mon Feb 01, 2021 2:56 am
I'm still having trouble with the microphone. Sometimes it just doesn't accept having modules module passed to it.
I wrote a little IF statement in my .bashrc to start pulse and load modules too. Even adding them command line doesn't always work.
Pulseaudio is not really necessary, you can simply configure alsa, it should be enough.
Beamforming with ALSA? I haven't found anything about that anywhere.

L67GS
Posts: 458
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 136 times
Been thanked: 66 times
Contact:

Re: Speech Recognition on ODROID

Post by L67GS »

Oh, and ALSA hates my PS Eye, alsamixer crashes if I try to select it

nshmyrev
Posts: 47
Joined: Sat Dec 12, 2020 10:14 pm
languages_spoken: english
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Speech Recognition on ODROID

Post by nshmyrev »

> Beamforming with ALSA? I haven't found anything about that anywhere.

Pulseaudio beamformer is just a name, it tracks fixed source, the implementation is trivial 10 lines of code:

https://cgit.freedesktop.org/~arun/puls ... beamformer

Real beamforming better done in a library, like webrtc:

https://chromium.googlesource.com/exter ... mformer.cc
These users thanked the author nshmyrev for the post:
L67GS (Mon Feb 01, 2021 11:54 pm)

L67GS
Posts: 458
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 136 times
Been thanked: 66 times
Contact:

Re: Speech Recognition on ODROID

Post by L67GS »

Julius works but isn't ideal for what I'm trying to do, Vosk works but it's not trainable.
I'm starting to work more seriously on DeepSpeech, the arm7 version wouldn't work before.
Worst case scenario I guess is Julius and a limited vocabulary for now.

mad_ady
Posts: 9374
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 599 times
Been thanked: 660 times
Contact:

Re: Speech Recognition on ODROID

Post by mad_ady »

Oh, how advanced does it have to be to understand "Kill all humans"?
These users thanked the author mad_ady for the post (total 2):
nshmyrev (Wed Mar 10, 2021 1:20 am) • L67GS (Wed Mar 17, 2021 6:47 am)

L67GS
Posts: 458
Joined: Wed Apr 22, 2020 3:02 pm
languages_spoken: English, Jibberish, Pig Latin
ODROIDs: XU4, C1+,(3) C0's, and a whole big pile of accessories, VU7A Plus,, ect....
Has thanked: 136 times
Been thanked: 66 times
Contact:

Re: Speech Recognition on ODROID

Post by L67GS »

mad_ady wrote:
Wed Mar 10, 2021 12:31 am
Oh, how advanced does it have to be to understand "Kill all humans"?
THAT can be done with Julius!
Even a simple phrase falls prey to misunderstanding on Vosk, pocketsphinx could do it given enough time, after a few years Kaldi might run to test it.

If DeepSpeech cannot be made to perform I'm falling back to Julius and doing "key phrases" (not sure if that's a thing or I just coined it) and limiting the conversational aspect of the project.

nshmyrev
Posts: 47
Joined: Sat Dec 12, 2020 10:14 pm
languages_spoken: english
Has thanked: 14 times
Been thanked: 10 times
Contact:

Re: Speech Recognition on ODROID

Post by nshmyrev »

Hey, some Vosk recent updates: we have moved to JNA/CFFI framework for all the bindings meaning you can distribute same library for all languages and versions. Now you can install Vosk with Maven/Nuget/NPM/Pypi with a simple commands and it should work independently of Node or Python version. Great progress!

https://www.nuget.org/packages/Vosk/
https://www.npmjs.com/package/vosk
https://alphacephei.com/maven/com/alphacephei/vosk/
https://pypi.org/project/vosk/

Android platform has been redesigned too, now it loads models much faster and follows recent Android practices too.
These users thanked the author nshmyrev for the post:
L67GS (Wed Apr 21, 2021 11:56 pm)

Post Reply

Return to “The Ideas”

Who is online

Users browsing this forum: No registered users and 0 guests