react-native-voice / voice

:microphone: React Native Voice Recognition library for iOS and Android (Online and Offline Support)
MIT License
1.81k stars 488 forks source link

null is not an object (evaluating 'Voice.startSpeech') in Expo #376

Open vishnu-neopay opened 2 years ago

vishnu-neopay commented 2 years ago
null is not an object (evaluating 'Voice.startSpeech')
at node_modules/@react-native-voice/voice/dist/index.js:66:16 in Promise$argument_0
at http://192.168.43.200:19000/index.bundle?platform=android&dev=true&hot=false&minify=false:203845:26 in start

Apply this change in app.json or app.config.js:

{
  "expo": {
    "plugins": ["@react-native-voice/voice"]
  }
}

Next, rebuild app as "Adding custom native code" guide.

expo run:android

getting this issue

Jan-Graf commented 2 years ago

You only changed this? Before everything worked fine?

vishnu-neopay commented 2 years ago

yes i only change this..

jolo-dev commented 2 years ago

I got the same and I am kinda stucked.. Even tried it with the react-native- CLI.

awii258 commented 2 years ago

This error only on emmulator or expo go app that you install in your mobile if check this library are working So build a eas development -p all --profile platform and also expo dev client use so library is working("https://docs.expo.dev/development/getting-started/#developing-your-app")

danielshaban1 commented 2 years ago

issue

Same issue here!!!

danielshaban1 commented 2 years ago

Any solution?

vishnu-neopay commented 2 years ago

it will not run in development mode.. just make a build and run app

inglesuniversal commented 2 years ago

Can this project run with the standard Expo account? Without ejecting the APP or do I need the EAS Plan?

josethz00 commented 2 years ago

any progress on this issue? This project is still maintained?

aha85b commented 2 years ago

it will not run in development mode.. just make a build and run app

Did you get it to work at all? I have followed all instructions but it did not work.

mchriss commented 2 years ago

You have to eject your expo app in order to use the native functionalities, like audio recording.

aha85b commented 2 years ago

You have to eject your expo app in order to use the native functionalities, like audio recording.

Even after ejecting the app, it is still does not work.

mchriss commented 2 years ago

Did you add these lines to your AndroidManifest file?

<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<queries> <package android:name="com.google.android.googlequicksearchbox"/> </queries>
dgaviriag commented 2 years ago

I have the same issue: WARN Possible Unhandled Promise Rejection (id: 0): TypeError: null is not an object (evaluating 'Voice.startSpeech') http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:119711:18 tryCallTwo@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:30613:9 doResolve@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:30777:25 Promise@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:30636:14 start@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:119701:27 http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:119505:35 generatorResume@[native code] asyncGeneratorStep@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:25072:26 _next@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:25094:29 http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:25101:14 tryCallTwo@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:30613:9 doResolve@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:30777:25 Promise@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:30636:14 http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:25090:25 empezarVozATexto@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:119510:26 onPress@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:119545:34 _performTransitionSideEffects@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:67455:22 _receiveSignal@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:67397:45 onResponderRelease@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:67237:34 invokeGuardedCallbackProd@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:3109:21 invokeGuardedCallback@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:3213:42 invokeGuardedCallbackAndCatchFirstError@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:3217:36 executeDispatch@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:3293:48 executeDispatchesInOrder@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:3313:26 executeDispatchesAndRelease@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4662:35 forEach@[native code] forEachAccumulated@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:3843:22 runEventsInBatch@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4686:27 runExtractedPluginEventsInBatch@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4766:25
http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4741:42 batchedUpdates$1@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:17151:20 batchedUpdates@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4648:36 _receiveRootNodeIDEvent@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4740:23 receiveTouches@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:4794:34 callFunction@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:24031:36 http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:23759:31 guard@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:23985:15 callFunctionReturnFlushedQueue@http://192.168.1.71:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:23758:21
callFunctionReturnFlushedQueue@[native code]

AqibNaeem19 commented 1 year ago

Did you guys found any solution to this problem??

svanin91 commented 1 year ago

hi guys, the error null is not an object (evaluating 'Voice.startSpeech') is also blocking for me, has anyone found anything?

Parcurcik commented 1 year ago

Hi, did anyone solve it?

Parcurcik commented 1 year ago

hi, i solved it, you need to run this project with android SDK

ayushgupta-1 commented 1 year ago

Hey @Parcurcik , what do you mean by Run with android sdk ?

My Query : https://stackoverflow.com/questions/75742318/react-native-voice-speech-to-text-not-working-in-android