Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

onAudioEvent() not triggering when pagacking the Cognitive Speech Libary in a cordova plugin #75

@roymasad

Description

@roymasad

Let me explain

I managed to wrap the entire Cognitive Speech Library in a cordova plugin. ( .aar sdk file and .so native library arm files)

It works, i can initialize and start listening on the mic normally getting results back on onFinalResponseReceived() and sending them back to the webview cordova app.

All works well, apart from onAudioEvent(), when packaged as cordova plugin, that function doesnt fire, so i cant detect when speech recognition is/stopped working.

The problem isnt that i cant send results back, no in the native plugin code itself onAudioEvent() no longer triggers.

this is my class relevant parts

public class BingSpeechPlugin extends CordovaPlugin implements ISpeechRecognitionServerEvents

        this.micClient = SpeechRecognitionServiceFactory.createMicrophoneClient(
          cordova.getActivity(),
          mode,
          language,
          this,
          bingkey);

the same code works fine and onAudioEvent() triggers properly if run directly as a native app from android studio without the cordova plugin package.

startMicAndRecognition() works fine in cordova plugin mode and i do get results on onFinalResponseReceived()

onAudioEvent() on the other hand doesnt seem to auto trigger anymore

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions