Speech Error

Action to detect Speech error

public void OnSpeechError (string err)

ParameterDescription

err

The error that occured

To detect Speech error, you need to implement three callback methods exposed through the VoiceManager:

OnSpeechEvent (string err)

Action will be called only when it’s subscribed to a method. Action must be subscribed to the method with a matching signature.

using JMRSDK;
using UnityEngine;

public class JMRDemoVoiceExample : MonoBehaviour
{
    private void OnEnable()
    {
        JMRVoiceManager.OnSpeechError += SpeechError;
    }

    private void OnDisable()
    {
        JMRVoiceManager.OnSpeechError -= SpeechError;
    }

    private void SpeechError(string err)
    {
        string spError = err;
    }
}

Last updated