Candice the personal assistant robot

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

speaker-test -c2 just runs and runs but this is the first part of the output:

root@odroid:/# speaker-test -c2

speaker-test 1.2.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 16384
Period size range from 16 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right
Time per period = 5.651652
0 - Front Left
1 - Front Right
Time per period = 5.979910
0 - Front Left
1 - Front Right
Time per period = 5.979942

That pattern just repeats with slightly different numbers for time per period, up and down.
I eventually removed the power and re-booted.
peaker-test -c1 does much the same, no sound with either test.

root@odroid:~# speaker-test -c1

speaker-test 1.2.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 32768
Period size range from 32 to 16384
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
0 - Front Left
Time per period = 2.229557
0 - Front Left
Time per period = 2.909872
0 - Front Left
Time per period = 2.899954
0 - Front Left
Time per period = 2.899927

User avatar
odroid
Site Admin
Posts: 35871
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1316 times
Been thanked: 910 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

'c1' should be the HDMI sound output and 'c2' should be the HFi Shield DAC sound output.
I think Ubuntu 20.04 seems to have a problem with the stock ALSA driver.
If you don't mind, keep using the 18.04 for your project.
These users thanked the author odroid for the post:
L67GS (Tue Sep 08, 2020 1:24 pm)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

odroid wrote:
Tue Sep 08, 2020 1:20 pm
'c1' should be the HDMI sound output and 'c2' should be the HFi Shield DAC sound output.
I think Ubuntu 20.04 seems to have a problem with the stock ALSA driver.
If you don't mind, keep using the 18.04 for your project.
I saw another user having trouble with 20.04 and was thinking the same thing.
BTW, ctrl + Z exits speaker-test or it just runs and runs....

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

This is interesting, alsa driver is also not working in 18.04 mate. Same nothing from command line but if I plug in a monitor, keyboard, and trackball and use gui it plays audio like it did when I did my sound test in mate.
It looks like pulseaudio is the only sound server working. I'm going to try aplay/terminal again and resample the wav files at different frequencies tonight and try that. Alsa may not be decoding properly.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Also run alsamixer and check if audio is muted. Or use paplay instead of aplay.
These users thanked the author mad_ady for the post:
L67GS (Wed Sep 09, 2020 12:40 am)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Wed Sep 09, 2020 12:32 am
Also run alsamixer and check if audio is muted. Or use paplay instead of aplay.
I'll try that tonight, I also want to learn about any alsa config files tonight and see if something is happening there.
Before I get too invested I need to see what sound server is used by Festival and if it can be changed or if that's going to focus my efforts.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Here's a recent picture too, I can't wait to be finished and clean the bench in my lab. Robots are soooo messy!

20200908_115055.jpg
20200908_115055.jpg (427.33 KiB) Viewed 1409 times

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Robots are soooo messy!

I'm sure they think the same about humans...
These users thanked the author mad_ady for the post:
L67GS (Thu Sep 10, 2020 12:03 am)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Last night I got wiringpi working on the C1+ to where it can control the amplifier and send input to the PIC. I need to invert an input on the PIC but that's a simple matter.
One significant snag was in 18.04 I was unable to compile Candice's program even with very specific flags in g++ <filesystem> wasn't happening so I went back to 20.04 minimal and decided to continue the battle with sound.
Also, adding Candice's program to rc.local results in a corruption with journaling, even if I sleep 30 before it there's still corruption but I think I have a workaround for it.
Tonight I'm tackling that, making an image at that point, and working on sound.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

You should abandon rc.local and try a systemd service file instead.
These users thanked the author mad_ady for the post:
L67GS (Thu Sep 10, 2020 1:58 am)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Thu Sep 10, 2020 1:17 am
You should abandon rc.local and try a systemd service file instead.
That makes sense, I'm using systemd for autologin. I wonder if I can do something like a short sleep and then execute in that same file.
My initial try was going to have rc.local start a small c++ program that waited 30 seconds and then start the ai.
Then when the ai loads the audio drivers and calls for wiringpi the computer would be safely booted.
Theoretically I could just install the audio the right way and then use systemd to start the ai.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Here's an example that starts x11vnc after the x11 server starts:

Code: Select all

adrianp@spica-c2:~$ cat /etc/systemd/system/x11vnc.service
[Unit]
Description=VNC Server for X11
#Requires=display-manager.service
#After=display-manager.service
After=graphical.target

[Service]
Type=forking
ExecStart=/usr/bin/x11vnc -forever -bg -geometry 1280x720 -usepw -shared -noprimary \
  -auth /var/run/lightdm/root/:0 -display :0 -rfbauth /etc/x11vnc.pass

[Install]
WantedBy=multi-user.target
You normally set dependencies between services and don't rely on sleep.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Poking at sound in 20.04 minimal again tonight. I decided to see if there was any life through HDMI audio, speaker-test works fine with HDMI but I just get a pop and a few squeaks through it when I play a file with aplay.
I'm going to do some more tests with wav files under HDMI audio.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Got sound working with pulseaudio. She's making sounds, and festival is running and configured so she's even talking in the right voice!

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Mon Aug 31, 2020 2:32 pm
It's probably been discussed a few times, but not in a centralized way.
The simplest and less efficient way of doing it would be to put your emmc in a card reader on a linux system and running

Code: Select all

sudo dd if=/dev/sdX of=/path/to/backup.img bs=1M
Pros: you can flash it with etcher, and it's simple
Cons: It backs up free space, and you can restore to a same size or larger media

Method 2 involves using gparted to shrink the last partition, using a dd parameter to copy up to the point after the last partition ends and adding back /aafirstboot so that it resizes on first boot.
It's more work but results in a smaller backup and it's faster to restore.
I cheated, I cheat whenever I can. I've switched to an 8Gig eMMC until it's all working properly so I can just DD images quick & dirty without resizing. Once she's up and everything is cool I'll flash my 128gb eMMC.
I've already made two progressive images as things progress so there are distinct restore points at milestones.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Having some hiccups with wiringPi but this was still a fruitful day. Candice is running assembled for the first time.
I had to use system ("gpio write pinnumber state"); for now but Candice is controlling the MOSFET through the microcontroller, muting/unmuting the amplifier, and controlling the eye LEDs.

I have to get wiringpi running to do the analog read for her battery monitor and 7 inputs for the sensor array yet so I'll just convert the outputs to wiringpi when I get there.

Still haven't gotten her program to autostart, when I put it in systemd it causes a weird loop that prohibits successful booting. I'm thinking about installing a small maintenance switch under her mask and then when I can get autostart working just have it start a small c++ program to check a GPIO and see if the swith is in maintenance mode. If the switch isn't in maintenance mode it would start candice.out and terminate itself, and if it is in maintenance mode it'll just terminate and leave the C0 running so I can interact through serial or ssh.

The sensor array got assembled and installed yesterday but I don't have jumpers to GPIO made yet. It's 3 sensitivities of vibration/shock, and 4 tilt switches. I've been kicking around the idea of installing a PIR at some point so she knows when someone is approaching but that would require the removal of the transparent window on the front and I'm not sure I want to do that yet.

Yesterday I got geared up to make her face mask but the plastic I had for it has mysteriously vanished so I ordered more, lemonade from lemons I suppose because it gave me more time this weekend to work on software.

I'm going to make an image file here before I keep tinkering with wiringpi and lose traction, but I'm still very satisfied with the recent progress.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I got wiringpi working, but it complains some of the ports aren't valid, also pin 7 will go high when commanded, but only stay high for a second.
I also rewrote and optimized the PIC, adding more turn off delay and changing the eye LEDs to have a 500ms start delay, and be 50ms faster to better match festival's speech rate.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Check that pin 7 isn't being used by some driver (maybe one wire w1?). cat /sys/kernel/debug/gpio will tell you.

User avatar
odroid
Site Admin
Posts: 35871
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1316 times
Been thanked: 910 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

Also check 'lsmod' output too.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I figured out why some of the ports weren't working, it was because I was dumb. They aren't GPIO, but data and analog....
I'm still not sure why 7 is peculiar but I did the suggested tests and posted the outputs in a more specific thread.
It doesn't look like 7 is busy.
viewtopic.php?f=115&t=40260&p=306420#p306420

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

It is onewire. You can blacklist the module, or maybe disable it via dtb...

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Tonight I got hardware nearly finished.. I bench tested a TMP36 TO-92 case temp sensor and added it to the sensor array. I also made a bunch of proper jumpers so she doesn't have those random ones dangling anymore.
On the breadboard I found I can enable the TMP36 with a GPIO through a bjt, and it draws 0ma in it's off state with a BC548 so that's how it's in but I still need to write the code.
The whole sensor array is wired and working but I may scrap it and make a new one, I'm not entirely happy with the achievable angles on the tilt sensors, two of the three shock sensors would only trigger if she fell off a cliff, and the third still requires a pretty good thump to trigger.
Also I may put a second TMP36 in between the C0 and sound shield so she can alert me if her computer gets uncomfortably hot.
I think two TMP36's can share an analog input since I can trigger their switching transistors with two GPIOs.
That way I can keep the only remaining analog input for the voltage monitor I have yet to make.
I'm going to spend this next week writing code, then next weekend work on her battery voltage monitor and face mask.
If I find a better low power shock or g sensor solution I'm definitely rebuilding the sensor array sooner than later!
20200919_044128.jpg
20200919_044128.jpg (506.64 KiB) Viewed 1212 times
These users thanked the author L67GS for the post:
odroid (Mon Sep 21, 2020 11:28 am)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I got ADC1 reading last night but I still need to write the code and do the maths but Candice is using the temperature sensor and enabling it with a GPIO as planned.
I noticed it gets different sequential temps if taken in a row so I've written a timer in so there's a wait period between turning the sensor on and taking a read to allow the sensor to warm up.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Why not leave the temperature sensor always on?

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Mon Sep 21, 2020 12:45 pm
Why not leave the temperature sensor always on?
If I do the one under the SBC she'll only check it periodically, and this one will only get checked if a user asks the temperature, which could be a matter of days or weeks between uses.
The TMP36 is low power consumption (the TMP36 data sheet says 50 microamps max), but I figured no power consumption was even better since the project is battery powered.
Also, switching them leaves me the option of using that input for multiple sensors.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Ordered this today, looks like I'll be working on SPI.
https://www.amazon.com/DAOKI-Accelerati ... 864&sr=8-1

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I just tested these TMP36 sensors, first individually, then in parallel, but activated one at a time.
Both give exactly the same readings either way, so there's no voltage drop across the inactive sensor.
Theoretically I could run many into one adc and read many zones, but I'm thrilled to do 2, one for ambient temperature, the other for Odroid temperature.

20200923_165918.jpg
20200923_165918.jpg (400.36 KiB) Viewed 1128 times
20200923_163727.jpg
20200923_163727.jpg (463.34 KiB) Viewed 1128 times

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

On my next one I plan on doing a Linux carputer version of Candice, that one will require a GPS.
I'm thinking about dabbling with GPS on this platform sooner, is there a recommended GPS module that would work well with mapping software later, and use SPI or UART data that the C0 can read now?

User avatar
odroid
Site Admin
Posts: 35871
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1316 times
Been thanked: 910 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

We've tested only USB type GPU receiver. But I think any UART type should work fine.
These users thanked the author odroid for the post:
L67GS (Fri Sep 25, 2020 9:42 am)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

odroid wrote:
Fri Sep 25, 2020 8:54 am
We've tested only USB type GPU receiver. But I think any UART type should work fine.
.

BN-880 is the one I'm most interested in currently, it should be able to do UART.


https://www.amazon.com/gp/aw/d/B078Y632 ... op?ie=UTF8

User avatar
odroid
Site Admin
Posts: 35871
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1316 times
Been thanked: 910 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

It looks fine and the internal compass feature is very interesting.
But you need to double check the UART Rx/Tx pins interface voltage level which must be 3.3Volt.
These users thanked the author odroid for the post:
L67GS (Fri Sep 25, 2020 12:57 pm)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Oh cool, there's a Linux driver for the ADXL345 gyro I got,
There's even a .h file so hopefully that's easy and lean.
I'm sticking the link here for future reference.

https://wiki.analog.com/resources/tools ... sc/adxl345

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Working on Kaldi setup this weekend, I knew it was going to be a battle and sure enough it hangs on compilation.
Thankfully I pulled an image just before so I re-flashed and picked up with Julius for a while last night.
Hopefully I can have something running this week. Pocketsphinx is just too slow, it takes 10 seconds on my big computer to return results. Kaldi actually looks like the best option so I may crack open the makefile and do compilation step by step to find the error.
When I get something running I'll do a little write-up outlining installation.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Still in progress with voice recognition. Kaldi is a bear to set up, and it requires openfst which took 36ish hours straight to run make for on a C1+.
I really wish I'd fitted a fan to the poor lil' guy before I started all this.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I've been through 5 failed Kaldi installations. Openfst is a big problem, it takes forever to install and then kaldi ./configure fails because it can't effing find it, when I put it where it can find it kaldi still fails and says it's the wrong version.
I'm back on Kaldi direct from the Git repo so hopefully the openfst that's packaged with it behaves.
I've scoured the internet about it and tried everything that worked for everyone else to no avail.
Honestly if it fails again I don't know how much more effort I want to keep putting into kaldi. I may just do yet another clean flash and fall back to pocketsphinx, with enough voice training it's pretty accurate and it's certainly lighter than kaldi but it's very slow.
Still ~15 hours to go on the current openfst compilation and then I may have some hard choices to make but I'm becoming very intolerant of this delay in my project.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Still no Kaldi so I wiped the foam off my mouth and turned my attention to Julius.
Three weeks with Kaldi and all I got was a big bump in blood pressure, a few hours with Julius and I have fast running speech recognition running on Odroid C0/C1+.
The vocabulary is incredibly limited in the quickstart version so tomorrow night I'm going to read everything Julius and learn how to add new language models, but this is a huge relief.
I'll be hacking the USB microphone tomorrow to upgrade the element too.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

Candice's "ears" are ready. I started with a USB mic from Ameridroid.
https://ameridroid.com/products/usb-min ... 173b&_ss=r

I needed to break the element out to somewhere practical, I had done some math stuffs and looked at specs for another project so I knew these were a winner for use in parallel from previous experience.
https://www.mouser.com/ProductDetail/CU ... pf9w%3D%3D

Initially using the native element I had to be 18" or less away speaking loudly for Julius to hear me with the gain set to 100%, after the mod I'm 4-6' away speaking calmly with the gain set to 45%.
The coverage area is also dramatically improved and then doubled to boot.

I went with a 2X2 female Dupont connector for the pigtail and a 2X1 male on each element, the maker of the microphone was nice enough to mark + & - on the board so I didn't have the study the circuit or anything.
20201023_003858.jpg
20201023_003858.jpg (1.12 MiB) Viewed 554 times

User avatar
odroid
Site Admin
Posts: 35871
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1316 times
Been thanked: 910 times
Contact:

Re: Candice the personal assistant robot

Post by odroid »

Looks good but I think two microphones with a single mono sound input configuration seems not to be familiar.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

odroid wrote:
Fri Oct 23, 2020 3:01 pm
Looks good but I think two microphones with a single mono sound input configuration seems not to be familiar.
I agree, microphone elements in parallel on a single channel is frowned upon though commonly done with guitar pickups.
Those little elements however work clear as a bell like that on both projects I did it to.
These users thanked the author L67GS for the post:
odroid (Fri Oct 23, 2020 6:40 pm)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I had my first brief verbal conversion with the Candice AI tonight. The whole speech recognition dance is clumsy yet, and needs tweaked, but I have proof of concept after a nearly solid weekend of work.
Aside from eating and sleeping, this is about all I've worked on since after work Friday.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

My api is returning a useable string reliably, next I'll write a small program to "parrot" my words back to me while I work on accuracy and expansion of her vocabulary.
Speech recognition is an endless stream of kicks in the groin .... I'm not having fun with this part of the project.
I've got between 2 & 3 hours of vocabulary expansion done and that puts me about 2/3 of the way through the letter "a".

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

I've currently got about 50 hours into thinning the dictionary so that puts me on the letter F. I had an interesting thought yesterday and made a very small dictionary where the individual phenomes returned themselves.
My theory was that if festival could speak the phonomes then response training could be purely phonetic and not human readable since Candice writes them anyway.
Unfortunately the phenomes don't get heard exactly the same each time.
I'm still going to keep working on the dictionary but I think I'm going to explore what the phenomes used by festival are and write a dictionary that's larger, maybe 100 - 150 lines to translate Julius phenomes into festival phenome groups and try that.
If I can pull off a strictly phonetic dictionary suddenly Candice becomes all knowing, even to the point of being able to hear and record responses in a multitude of languages.
And a phonetic dictionary would be done in an evening rather than the remaining 60 some hours I have left on the master dictionary file from voxforge.
And that method would return a string lightning fast compared to a dictionary with 50,000 possible matches per word.
At any rate I'm getting closer, to another failure or success remains to be seen but I'm closing the gap on something or another.
These users thanked the author L67GS for the post:
odroid (Fri Nov 20, 2020 9:24 am)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

GRRR!!
I had to join HTK to download HTK, then I'm all excited to make my own language model (predicting increase from my current 60 - 70% to about 90% accuracy) and HTK needs x11 to run.
I was hoping to do all my language model training on the Candice platform so the acoustics were the same ase those during use.
It's not the end of the world I suppose, I can use a different C0 or my C1+ with my VU7A and still use Candice's microphones on the 18.04 image.
Maybe I'll finally make microphone brackets and temporarily put them on the VU7A mounting holes to hold them forward rather than having them bumbling around like they are now.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

You can still run on the original c0. Either through vnc, or with X11 forwarding over ssh (or with xpra if you're more adventureous). Let me know if you need help with it.

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Wed Nov 25, 2020 4:42 pm
You can still run on the original c0. Either through vnc, or with X11 forwarding over ssh (or with xpra if you're more adventureous). Let me know if you need help with it.
That's interesting but I don't know if it would work here. The software requires x11.h. I'm tempted to put x11.h into the appropriate directory and try it but x11.h is probably an api of sorts.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 529 times
Contact:

Re: Candice the personal assistant robot

Post by mad_ady »

Most likely you need to install x11-dev or libx11-dev (no idea what it's called)

L67GS
Posts: 251
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: 79 times
Been thanked: 35 times
Contact:

Re: Candice the personal assistant robot

Post by L67GS »

mad_ady wrote:
Thu Nov 26, 2020 2:32 am
Most likely you need to install x11-dev or libx11-dev (no idea what it's called)
I think I'm going to try that tonight, I just hate bloating the install with single use stuff but I suppose it can be uninstalled after my language model is made.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest