riderodd / react-native-vosk

Speech recognition module for react native using Vosk library
MIT License
36 stars 9 forks source link

iOS - onPartialResult null string value #47

Closed SuavePirate closed 3 months ago

SuavePirate commented 3 months ago

Hello! We have this implemented for both Android and iOS - Android works like a charm, but on iOS we get a null value passed in for the onPartialResult callback function.

Example logs output from both the onPartialResult and the onResult on iOS:

 LOG  partial result:  null
 LOG  partial result:  null
 LOG  partial result:  null
 LOG  partial result:  null
 LOG  partial result:  null
 LOG  final result:  check check one to one two

So we can see that the event is firing but no value for res in

const partialResultEvent = vosk.onPartialResult(async (res) => {
            console.log('partial result: ', res);
});
const resultEvent = vosk.onResult(async (res: string) => {
            console.log('final result: ', res);
});

Any guidance or workaround would be greatly appreciated!

riderodd commented 3 months ago

I'll Check on that wednesday, sorry for the delay 😅

Le lun. 25 mars 2024, 23:04, Jon Campbell @.***> a écrit :

What are our thoughts on the timing of this - should we give them till the weekend to update the release, or do we want to temporarily check-in a locally built library until then?

— Reply to this email directly, view it on GitHub https://github.com/riderodd/react-native-vosk/issues/47#issuecomment-2018999667, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAT7RRRG47ETFSBYYNO3DN3Y2CNQLAVCNFSM6AAAAABFB5PXMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJYHE4TSNRWG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SuavePirate commented 3 months ago

Thanks @riderodd! Btw it looks like #48 fixes it - tested on my devices and partials are coming through

riderodd commented 3 months ago

Fixed on 0.2.2