PopeSpaceous / CodeTalker

A Visual Studio Code Add-on that allows Speech to HTML code.
3 stars 4 forks source link

add research for google cloud api, and various strategies for getting mic input #14

Closed Michael-Overall closed 6 years ago

Michael-Overall commented 6 years ago

Addresses #11 .

Purpose:

Michael-Overall commented 6 years ago

To build off of previous work from @steaward in mic-testing, I was also looking at a stack overflow discussion on piping child process data back to the calling script.

This might get us closer to streaming audio instead of saving it to a file, then processing it.

We can also probably grab the text that was being spit back to the command line and try to pass it into the editor's window (see this article on putting text in the IDE

in extension.js:


        startMic.then(function () {
            spawn.exec('python ' + pyScriptLoc, {cwd: __dirname}, (error, stdout, stderr) => {
                console.log("going to gather the words...")
                if (error) {
                    console.error(`exec error: ${error}`);
                    return;
                }
//we may be able to grab the text in the 'stdout' variable and shove that into the editor
                console.log(`Words you spoke: ${stdout}`);
            });
        })

    });

I'll start a new issue in regards to this.