123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|533|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> AI Threads -> Machine Made Max

Page : 1 2 3 4 Prev 5 6 Next 7 8
Sun, 16 Apr 2023, 13:48
spinal
Yes, everything is being recorded in one go. OBS has the ability to delay the video but not the audio, so then I'd have the voice maybe being close but the main audio being early.

-=-=-
Check out my excellent homepage!
Sun, 16 Apr 2023, 13:49
Jayenkai
Dangit..
Sun, 16 Apr 2023, 15:22
spinal
Remind me to half the sample rate, might do something.

-=-=-
Check out my excellent homepage!
Sun, 16 Apr 2023, 15:23
Jayenkai
Remember to try halving the sample rate, to see if that does anything.
Also, reducing to 16 or even 8 bit might help, too. And mono, of course.
No idea how much quicker that might happen, though, if you're having to reduce the wav, that's a whole extra step.

-=-=-
''Load, Next List!''
Mon, 17 Apr 2023, 00:58
spinal
Didn't help.
Mon, 17 Apr 2023, 01:31
Jayenkai
Aww
Mon, 17 Apr 2023, 01:46
spinal
Hmmm, maybe 2 threads for speech recognition, alternating if one is in use already.....

-=-=-
Check out my excellent homepage!
Mon, 17 Apr 2023, 14:16
spinal
Easier way for shorts like this. Type in the text to be spoken, then play along in time with the instructions...



View on YouTube

-=-=-
Check out my excellent homepage!
Mon, 17 Apr 2023, 16:40
Jayenkai
That's a nice method.
I think you'll probably keep going back and forth between live, voice first, or even video first.
Keep going, though! It's an awesome project.

-=-=-
''Load, Next List!''
Thu, 20 Apr 2023, 02:40
spinal
Timing problem discovered, there is no fix, other than what I said earlier.

If I say something that the speech recognition does not understand, It takes much longer to decide what to output.
That makes sense. If it knows what I say then It finds the words quite quickly. If it doesn't know what I say, it probably has to scan through the whole dictionary and tries different combinations of sounds to try to find a match.

Moral of the tale, learn to speak more clearly.

-=-=-
Check out my excellent homepage!
Sun, 23 Apr 2023, 14:23
spinal
If Max is not the focused window, I can not use keyboard to control anything, so if he's being used for video recording, then I can't, say, change the background or force reset him.... until now!

I build a simple interface with an Arduino and keypad to send serial commands and have python monitor the com port. Now I can detect 16 button presses from an external keypad even if its not the focused window. This will be useful for some sort of idle movement, or facial expresion changing, but as a test, I cycled through my backgrounds and shoulder images...



Tha amount of code I have written vs what chatGPT has written is leveling out a bit.

-=-=-
Check out my excellent homepage!
Sun, 23 Apr 2023, 14:28
Jayenkai
Nice!!
Max Buttons!
Wed, 26 Apr 2023, 03:18
spinal
I think it's time to ask some real people if they can see what I'm doing wrong or inefficiently...



Currently, it builds the whole sentence, then outputs the audio. What I *want* is for it to output the audio wither after it's build each part (normal_text + stutter + repeated_word) or even after every sub part. But if I move the audio playing part into the inside loop, it seems to randomly not play parts of tha audio. I was thinking that maybe it was getting overritten, but that souldn't be an issue, as transfering the data to the audio buffer is a normal loop and prevent's it continuing.

Does anyone here know python better than chatGPT?

-=-=-
Check out my excellent homepage!
Wed, 26 Apr 2023, 04:32
Jayenkai
How is python understanding the end of a loop/if/while/repeat/etc?
Is it reading the number of tabs?

-=-=-
''Load, Next List!''
Wed, 26 Apr 2023, 04:33
spinal
Yup, tabs for loops. It does cause problems from time to time when copy+pasting.

-=-=-
Check out my excellent homepage!
Wed, 26 Apr 2023, 04:36
Jayenkai
I can imagine. That's not very structural, at all!!!
I'm trying to figure it out, but .. so far nothing's clicked, I'm afraid.

-=-=-
''Load, Next List!''
Wed, 26 Apr 2023, 04:50
spinal
No worries, maybe I'll just stick a delay in somewhere, see what happens 😛

-=-=-
Check out my excellent homepage!
Wed, 26 Apr 2023, 04:54
Jayenkai
Right, I don't think you can "stack" sounds in the pyaudio world..
That is, if you created a sound for each word, then tried to pass each one to the player, I don't think it would play one after the other.. it'd play each one anew, instead, and erase the current buffer.

"Once"--> "Upon"--> "a"--> "Time"--> would end up just playing "Time".. . Assuming the script is fast enough for all that to happen in an instant.

How fast is this function actually happening?
If you stick a start=mills() under the Global MinStutter,MaxStutter line, then output a few timestamps, we can see what's slowing things down.
We'll be wanting.. timestamp=mills()-start
One timestamp just above the audio_data = np.concatenate(audio_data_list) line
One second timestamp just below that line
and then a third timestamp just under the player.terminate() line.

That way we can tell if the bottleneck is all the audio processing, or if it's the something else.

-=-=-
''Load, Next List!''
Thu, 27 Apr 2023, 10:48
spinal
Got a little side tracked again, I added a wii nunchuck to my number keypad and am not sending joystick and acceleration data over serial to Max. I hope to have his head direction somehow match the orientation of the nunchuck and just tape it to a hat or something.

-=-=-
Check out my excellent homepage!
Thu, 27 Apr 2023, 10:58
Jayenkai
Sounds complicated!
Fri, 28 Apr 2023, 05:05
spinal
Ok, next step needs rethinking. Tried using a Wii motion plus adapter to detect movement, it works fine when plugged into the Arduino with a little adapter, but the whole Arduino malfunctions if I use a longer wire to attach it.

It seems that i2c has a wire length problem, so can't stick the wmp too a hat because it simply won't work.

-=-=-
Check out my excellent homepage!
Fri, 28 Apr 2023, 16:28
spinal
OK, got the motion plus working (maybe) it's sending/receiving data, but the values seem wrong. It *might* be the voltage, I'm running it off 5v, but i've read in a couple of places, that even though it wouldn't fry, it expects 3.3v, I assume that theres some sort of analogue gubbins doing the measurements, so I'll see what happens if I drop it to 3.3v...

-=-=-
Check out my excellent homepage!
Tue, 02 May 2023, 11:32
spinal
Small breakthrough today, I pursued chatGPT to tell me how to use a separate thread to queue the audio, so now as soon as a words audio is generated it is dumped into a separate queue and played in the background.
That's a small delay removed.

-=-=-
Check out my excellent homepage!
Tue, 02 May 2023, 11:37
Jayenkai
Sounds cool. Just be sure it ends up in the right order..
Eg, if it says "investigating the complication", "the" might end up being done before the rest, and it'll play out of order.

-=-=-
''Load, Next List!''
Tue, 02 May 2023, 11:58
spinal
I have no idea how python queues work, but they seem to be a first in first out sort of deal.

-=-=-
Check out my excellent homepage!
Tue, 02 May 2023, 12:59
spinal
I've switched the background to a plain colour to use chroma key in OBS. Which means instead of getting 30-50fps, I get at least 120fps.

However, I need to come up with a nice window (I'll probably throw something together in blitz) for the nice 80s style background graphics. It turns out that running win 3.1 in dosbox won't start the screen saver, perhaps dosbox has a timer issue or something.

-=-=-
Check out my excellent homepage!
Page : 1 2 3 4 Prev 5 6 Next 7 8