Closed WeTruck closed 4 years ago
In the app build.gradle
, you will need to add multiDexEnabled true
to the android
defaultConfig
.
This isn't always needed (depending on how big the project is), but I'll make sure to add a note about it in the documentation. Out of curiosity, what are you referencing as you set up the project so I can make sure to add a note in a helpful place?
Thanks for using Spokestack!
@noelweichbrodt Adding multiDexEnabled true
fixed this error.
I didn't add any code/package after initializing a project using this,
npx react-native init AwesomeProject
I don't know what are you talking about a big project.
One question, Can I use any custom wake-word? Like 'Hello demo app'? Or I should use 'Hello Spokestack' to use this package?
Thanks for your help :)
Adding multiDexEnabled true fixed this error.
Great! Glad to help.
Can I use any custom wake-word? Like 'Hello demo app'? Or I should use 'Hello Spokestack' to use this package?
For reference, here's the cookbook for React Native for wakeword activation: https://spokestack.io/docs/React%20Native/cookbook When you're running the project in iOS, you can choose your own wakeword. See https://spokestack.io/blog/choosing-the-right-ios-wakeword-service for more details. When running on android, you are limited to a trained model wakeword ("Spokestack" is one we distribute for free). See https://spokestack.io/docs/React%20Native/getting-started for more details.
Thanks for your references :)
Actually I'm a bit confused about if it's possible to do with Spokestack what I want to do. I want to make a workflow with this which will do,
Could you please tell me if this procedures could be possible with Spokestack?
Yes, what you outlined is possible with Spokestack.
1.
upon opening the app, you would follow https://github.com/spokestack/react-native-spokestack#javascript to call Spokestack.initialize
and then call Spokestack.start
2.
When Spokestack detects the configured wakeword, it will send the onActivate
event (https://github.com/spokestack/react-native-spokestack#events)
3.
When Spokestack detects speech after activation, it will send the onRecognize
event with a transcript
of the speech text.
HTH!
Thank you so much :) It really helps.
@noelweichbrodt It's playing a beep when I speak. I think it's from default android system. Is there any way to mute it?
There's no way to mute the beep that the io.spokestack.spokestack.android.AndroidSpeechRecognizer
makes when prompting for speech.
If that is unacceptable for your use, consider using io.spokestack.spokestack.google.GoogleSpeechRecognizer
or io.spokestack.spokestack.microsoft.AzureSpeechRecognizer
, both of which will require a client key from their respective (Google Cloud Speech, Microsoft Azure Speech) services. See the "Configuring Spokestack" section of https://spokestack.io/docs/React%20Native/getting-started for more information.
@noelweichbrodt Thanks for your reply.
If I use io.spokestack.spokestack.google.GoogleSpeechRecognizer
and upload my app to play store, will it be required to add client key of all users respectively? Or I can add my client key in my app and every user could use that?
If I use io.spokestack.spokestack.google.GoogleSpeechRecognizer and upload my app to play store, will it be required to add client key of all users respectively? Or I can add my client key in my app and every user could use that?
The latter. See https://cloud.google.com/speech-to-text for further details.
OK, thank you.
I'm getting this error while making project (Build>Make project) in Android studio.
Cannot fit requested classes in a single dex file (# methods: 166864 > 65536)
I'm using a newly created project to test this package.
npx react-native init AwesomeProject
My React native version is 0.62.2.
Another question, Should I follow anything from this step? https://github.com/spokestack/react-native-spokestack#rn-058-notes
I've followed all other steps.
Looking forward to have some help 🙏