Where to put pipeline profile?

After spokestacktray I am now implementing spokestack on react native ‘normally’. To use the Spokestack ASR I got the tip to put this in the configuration:

pipeline: {
‘profile’: Spokestack.PipelineProfile.TFLITE_WAKEWORD_SPOKESTACK_ASR
}

However, I get this error
TypeError: undefined is not an object (evaluating ‘_reactNativeSpokestack.default.PipelineProfile.TFLITE_WAKEWORD_SPOKESTACK_ASR’)

Should I put it in the properties instead? Complete init function below

Spokestack.initialize({
    input: 'io.spokestack.spokestack.android.MicrophoneInput', // provides audio input into the pipeline`
    stages: [
      'io.spokestack.spokestack.webrtc.VoiceActivityDetector', // voice activity detection
      'io.spokestack.spokestack.webrtc.VoiceActivityTrigger', // voice activity detection triggers speech recognition
      'io.spokestack.spokestack.ActivationTimeout', // speech recognition times out after a configurable interval when voice is no longer detected
      'io.spokestack.spokestack.asr.SpokestackCloudRecognizer'
    ],
    properties: {
       'wake-filter-path': './wakeword/filter.flite',
        'wake-detect-path': './wakeword/decode.flite',
        'wake-encode-path': './wakeword/encode.flite',
        'ans-policy': 'aggressive',
        'agc-target-level-dbfs': 3,
        'agc-compression-gain-db': 15,
        'vad-mode': 'very-aggressive',
        'vad-fall-delay': 800,
        'wake-threshold': 0.8,
        'pre-emphasis': 0.97,  
        locale: 'en-US',
      'trace-level': Spokestack.TraceLevel.DEBUG, // configurable logging level
    },
    tts: {
      ttsServiceClass: 'io.spokestack.spokestack.tts.SpokestackTTSService',
      // TTS API account properties. Only set these if you have a Spokestack account.
      'spokestack-id': ********, // your Spokestack API ID
      'spokestack-secret':
        '*******' // your Spokestack API secret
    },
    pipeline: {
        'profile': Spokestack.PipelineProfile.TFLITE_WAKEWORD_SPOKESTACK_ASR
    },
    // nlu: {
    //   // NLU settings. Only set these if you are calling `Spokestack.classify`.
    //   'nlu-model-path': './model/nlu.tflite', // string filesystem path to nlu model
    //   'nlu-metadata-path': './model/metadata.json', // string filesystem path to nlu metadata
    //   'wordpiece-vocab-path': './model/vocab.txt'// string filesystem path to nlu vocab
    // }
  })

Hi Lirry,

Apologies, the Tray is slightly behind the most current version of react-native-spokestack and does not support PipelineProfile yet. You have the following options:

  1. wait for a tray update (shouldn’t be too much longer)
  2. Using the most current version of react-native-spokestack, the configuration structure has been greatly simplified. See https://beta.spokestack.io/docs/react-native/getting-started#configuring-spokestack for details.

Hope this helps, let me know if you have further issues!

—Noel