EddyVerbruggen / nativescript-speech-recognition

:speech_balloon: Speech to text, using the awesome engines readily available on the device.
Other
90 stars 22 forks source link

Problem in startListening #4

Closed ahmagdy closed 7 years ago

ahmagdy commented 7 years ago

Hi when i'm using the code like this

this.speechRecognition.startListening({
            locale: "en-US",
            onResult: (transcription: SpeechRecognitionTranscription) => {
                console.log(JSON.stringify(transcription));
                console.log(`User Finihed?: ${transcription.finished}`);
            },

        }

transcription doesn't have a text property when i'm printing it JS: {"finished":true} so after looking around i found the problem in node_modules in speech-recognition.android.js options.onResult({ text: transcripts[0], i replaced it with text: transcripts.get(0) and it works just find

EddyVerbruggen commented 7 years ago

You're right, and that has been reported as #1 and fixed by #2. I'll push it to npm tomorrow!

ahmagdy commented 7 years ago

Great Thank you

EddyVerbruggen commented 7 years ago

Looks like I pushed 1.1.1 5 days ago, so if you're on that version this problem should not pop up..

ahmagdy commented 7 years ago

no it still pop up, i tried to remove and install it again, and still the same. maybe you need to check npm package.

EddyVerbruggen commented 7 years ago

I think you're right. The problem is that PR adjusted the .ts file (as it should), but publishing to npm didn't update the associated .js version. Let me see..

EddyVerbruggen commented 7 years ago

1.1.1 is dead, long live 1.1.2!