spokestack / react-native-spokestack

Spokestack: give your React Native app a voice interface!
https://spokestack.io
Apache License 2.0
56 stars 13 forks source link

Simplify config API by using new native turnkey builders #85

Closed noelweichbrodt closed 3 years ago

noelweichbrodt commented 3 years ago

An example minimal config that will still allow for wakeword, asr, nlu, and tts:

      Spokestack.initialize({
        properties: {
          'spokestack-id': 'f0bc990c-e9db-4a0c-a2b1-6a6395a3d97e',
          'spokestack-secret': '5BD5483F573D691A15CFA493C1782F451D4BD666E39A9E7B2EBE287E6A72C6B6'
        },
        pipeline: {
          'profile': Spokestack.PipelineProfile.TFLITE_WAKEWORD_NATIVE_ASR,
          'wake-filter-path': filterModelPath,
          'wake-detect-path': detectModelPath,
          'wake-encode-path': encodeModelPath
        },
        nlu: {
          'nlu-model-path': nluModelPath,
          'nlu-metadata-path': nluMetadataPath,
          'wordpiece-vocab-path': nluVocabPath
        }
      })

All keys are optional, but building without a component and then attempting to access it at runtime will result in a native error.