Closed willondubs closed 10 years ago
Thought I'd give you an update on how the implementation is coming along.
Thanks for the suggestion. I've been working on implementing it, but I am struggling to figure out an intuitive method structure for the duplex API. You can already sort of do it using a byte buffer anyhow. To implement it as you have suggested would just take rewriting a large portion of the API and designing a custom microphone interface and the like.
If you are referring to the Duplex API. We already have that implemented.
Update: Streaming audio from the Microphone is now functional. See latest commit.
Just making a suggestion that you could increase the efficiency of your program by streaming audio directly to GoogleSpeechAPIv2. Below is a working nodejs proof-of-concept. I'm still trying to make a Python variant. And I'm looking forward to trying your project on a RaspberryPi.
var request = require("request"); var rec = require('node-record-lpcm16'); rec.start({ sampleRate : 16000, verbose : true }).pipe(request.post({ 'url' : 'https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=apikeyhere', 'headers' : { 'Content-Type' : 'audio/l16; rate=16000;' } }, exports.parseResult)); }