Speech test


#1

First attempt at speech on Pokitto, I doubt I’ll try again.

https://os.mbed.com/users/spinal/code/speak_test/

speak_test.bin (117.5 KB)


#2

Sounds as if the syllables are coming out backwards?


#3

@spinal

Are you bitshifting signed values ?

 int currentSample = (snd[t].currentSound[(snd[t].soundPoint*snd[t].speed)>>8]);

#4

This pcm data is something im struggling with a little.

in this example,

 int currentSample = snd[t].currentSound[snd[t].soundPoint];

would be fine. thats a copy+paste from my music thingy.

the pcm data is unsigned, but when I’m attempting to adjust it in any way, I end up with a horrible mess.


#5

I also noted you do not get any kind of a pause on blank spaces

Either your sound buffer is not working the way you intended or the pointer for the current sample is moving in a way you don’t intend


#6

@spinal

Could you explain in general terms what it is that your code is supposed to be doing?

You have a Ticker function firing at 0.0001s … thats 0.1 milliseconds.

Something is not right about your approach.

I mean it seems you’re trying to brute force around something using the wrong means.


#7

It’s probably unrelated to your problem but you really need to get used to using std::size_t/size_t for sizes and array indices, otherwise int is going to bite you horribly one day.


#8

the timed function simply checks to see if the sound pointer is in a different quarter from last time, if so then update quarter of the sound buffer. I suppose the timer doesn’t need to be super fast,just fast enough to notice the change.
The data that is being used is a bunch of speech samples representing letters of the alphabet etc. each sound tracks its position the same way any other sound would, son once it’s finished, move on to the next letter.


#9

Buffer updates should be tied to movement of pointer to another quarter, when the data has been consumed.

If you run a Ticker at that frequency, it eats up most of the cpu. This is because the Ticker is actually a pretty high level function that allows unlimited timers using arithmetic.