Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to invoke virtual method 'boolean com.iflytek.cloud.SpeechSynthesizer.setParameter(java.lang.String, java.lang.String)' on a null object reference #49

Open
xiaoosnggao opened this issue Sep 7, 2019 · 1 comment

Comments

@xiaoosnggao
Copy link

经过测试是 Synthesizer.init 的时候报的错

代码如下:

 constructor(props) {
        super(props)
        Synthesizer.init("5a5b697b")
    }
    componentDidMount() {
        this.synthesizerEventEmitter = new NativeEventEmitter(Synthesizer);
        this.synthesizerEventEmitter.addListener('onSynthesizerBufferCompletedEvent', (e) => {
        });
        this.synthesizerEventEmitter.addListener('onSynthesizerSpeakCompletedEvent', (e) => {
        });
    }

报错信息如下

Attempt to invoke virtual method 'boolean com.iflytek.cloud.SpeechSynthesizer.setParameter(java.lang.String, java.lang.String)' on a null object reference
setTtsParam
    SpeechSynthesizerModule.java:183
init
    SpeechSynthesizerModule.java:108
invoke
    Method.java
invoke
    JavaMethodWrapper.java:372
invoke
    JavaModuleWrapper.java:160
run
    NativeRunnable.java
handleCallback
    Handler.java:751
dispatchMessage
    Handler.java:95
dispatchMessage
    MessageQueueThreadHandler.java:29
loop
    Looper.java:154
run
    MessageQueueThreadImpl.java:192
run
    Thread.java:761
@BILLXZY1215
Copy link

BILLXZY1215 commented Nov 16, 2021

我也是,同样的问题...解决了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants