Noitidart / FoxSpeak

ff-addon: An accessibility add-on which allows voice-to-text and text-to-voice.
2 stars 0 forks source link

Need to convert uint8 buffer to int16 buffer #3

Open 55abhilash opened 8 years ago

55abhilash commented 8 years ago

Okay @Noitidart . A little bit of problem. The file /src/programs/continuos.c in https://github.com/cmusphinx/pocketsphinx allows you to pass audio from a file, or from microphone, but not from an audio buffer. Can we directly let audio from mic pass to it? If not, its fine, I'll find another way to do it.

Noitidart commented 8 years ago

Ah thanks man. Can you please show the from file method. I can do that for sure. I can't feed straight from mic right now :( But if you can show that method second, I'll make sure to try to get that.

Right now i have an arraybuffer, but i can write that to file easily. If you can show me though how they are connecting the mic to pocket Ill see if i can pull it off. You are great man!

55abhilash commented 8 years ago

@Noitidart . One solution is to pass an int16 audio buffer. You mentioned we have a uint8, right? The file method in pocketsphinx itself reads from the file onto a int16 buffer. So, we can do the file method, or convert your the uint8 into int16 array. Just a suggestion. Your call. It will take me a little time as I am bundling all required files togethor for the audio passing.

Noitidart commented 8 years ago

No problem using int16 is perfectly fine. :) Yep we'll do conversion if we have to.

55abhilash commented 8 years ago

I committed the one to pass the file. Let us try using that for now. We can carry do the conversion stuff later.

Noitidart commented 8 years ago

Thanks so much will check in a couple hours :)

Noitidart commented 8 years ago

Hey man I got busy with work. And then some updates to Profilist.

I want to hit this, sometime this week. I'm real excited about this.

Right now my top priorites are this:

1) Work 2) FoxSpeak == MouseControl == Profilist 3) NativeShot

55abhilash commented 8 years ago

Sure, not a problem.

Noitidart commented 8 years ago

Hey man quick update this is top on my list. But you can see all the other stuff I was having to address due to user support requests and stuff. Really badly want to get this done soon and I will :)

Noitidart commented 8 years ago

Hey man, I finished the port of the c stuff. Now I have to hook up the webrtc listening to mic and feeding it to the file that Ill have the c read.

55abhilash commented 8 years ago

Sure sure. Let me know where you need help.

Noitidart commented 8 years ago

Thanks so much man, I know exactly what to do, just gotta get it done, working on the mic thing. :)

Had to get some work on Profilist in, how did your exams go?

55abhilash commented 8 years ago

Went great! I have a lot of spare time now so feel free to load me with work ;)

Noitidart commented 8 years ago

That is superb! I was hoping the best for you

Maybe if you like, you can start attacking the dll and dylib as I figure out this webrtc mic thingy :)

Noitidart commented 8 years ago

Hey @55abhilash I finalllllly got around to figuring out the mic. Thing if you install the addon, then click the button in the toolbar it will start recording. Then if you click the button again it will stop recording and play back what it recorded.

The next step is to feed it to this API.

So the first step I should do is convert it to int 16? I have a uin8 buffer right now.