Comments (8)
implementation project(':@react-native-community_voice')
After that also show different error that is below
I don't know how to fix this issue If yoou know tell me
from voice.
same i was also getting error but this library will without any of the manual steps just install it and use it
from voice.
same i was also getting error but this library will without any of the manual steps just install it and use it
const SpeechStartHandler =() =>{
console.log("speech start handler")
}
const SpeechEndHandler =() =>{
setRecording(false)
console.log("speech End handler")
}
const SpeechResultsHandler =(e) =>{
// const recognizedText = e.value[0];
// console.log("Recognized text:", recognizedText);
console.log('Resulthandler')
setResult("How are you?")
}
const SpeechErrorHandler =(e) =>{
setRecording(false)
console.log("Error handler:", e)
}
const startRecording = async () =>{
setRecording(true)
try{
await Voice.start("en-US") // en-US
}catch(err){
console.log("err", err)
setRecording(false);
}
}
const stopRecording = async () =>{
try{
await Voice.stop()
setRecording(false)
// fetch responce
}catch(err){
console.log("err", err)
}
}
useEffect(()=>{
console.log('use Effect cal')
Voice.onSpeechStart = SpeechStartHandler;
Voice.onSpeechEnd = SpeechEndHandler
Voice.onSpeechResults = SpeechResultsHandler
Voice.onSpeechError = SpeechErrorHandler
return () =>{
// destroy the voice instance
Voice.destroy().then(Voice.removeAllListeners)
console.log('Event listeners removed');
}
},[recording])
I add With out manual steps but the functions is not call when voice start I try couple of time but function is not triggered
from voice.
same i was also getting error but this library will without any of the manual steps just install it and use it
const SpeechStartHandler =() =>{ console.log("speech start handler") } const SpeechEndHandler =() =>{ setRecording(false) console.log("speech End handler") } const SpeechResultsHandler =(e) =>{ // const recognizedText = e.value[0]; // console.log("Recognized text:", recognizedText); console.log('Resulthandler') setResult("How are you?") } const SpeechErrorHandler =(e) =>{ setRecording(false) console.log("Error handler:", e) } const startRecording = async () =>{ setRecording(true) try{ await Voice.start("en-US") // en-US }catch(err){ console.log("err", err) setRecording(false); } } const stopRecording = async () =>{ try{ await Voice.stop() setRecording(false) // fetch responce }catch(err){ console.log("err", err) } } useEffect(()=>{ console.log('use Effect cal') Voice.onSpeechStart = SpeechStartHandler; Voice.onSpeechEnd = SpeechEndHandler Voice.onSpeechResults = SpeechResultsHandler Voice.onSpeechError = SpeechErrorHandler return () =>{ // destroy the voice instance Voice.destroy().then(Voice.removeAllListeners) console.log('Event listeners removed'); } },[recording])
I add With out manual steps but the functions is not call when voice start I try couple of time but function is not triggered
on which device you are testing ur code ?
from voice.
same i was also getting error but this library will without any of the manual steps just install it and use it
const SpeechStartHandler =() =>{ console.log("speech start handler") } const SpeechEndHandler =() =>{ setRecording(false) console.log("speech End handler") } const SpeechResultsHandler =(e) =>{ // const recognizedText = e.value[0]; // console.log("Recognized text:", recognizedText); console.log('Resulthandler') setResult("How are you?") } const SpeechErrorHandler =(e) =>{ setRecording(false) console.log("Error handler:", e) } const startRecording = async () =>{ setRecording(true) try{ await Voice.start("en-US") // en-US }catch(err){ console.log("err", err) setRecording(false); } } const stopRecording = async () =>{ try{ await Voice.stop() setRecording(false) // fetch responce }catch(err){ console.log("err", err) } } useEffect(()=>{ console.log('use Effect cal') Voice.onSpeechStart = SpeechStartHandler; Voice.onSpeechEnd = SpeechEndHandler Voice.onSpeechResults = SpeechResultsHandler Voice.onSpeechError = SpeechErrorHandler return () =>{ // destroy the voice instance Voice.destroy().then(Voice.removeAllListeners) console.log('Event listeners removed'); } },[recording])
I add With out manual steps but the functions is not call when voice start I try couple of time but function is not triggered
on which device you are testing ur code ?
Android
oppo a54
from voice.
same i was also getting error but this library will without any of the manual steps just install it and use it
const SpeechStartHandler =() =>{ console.log("speech start handler") } const SpeechEndHandler =() =>{ setRecording(false) console.log("speech End handler") } const SpeechResultsHandler =(e) =>{ // const recognizedText = e.value[0]; // console.log("Recognized text:", recognizedText); console.log('Resulthandler') setResult("How are you?") } const SpeechErrorHandler =(e) =>{ setRecording(false) console.log("Error handler:", e) } const startRecording = async () =>{ setRecording(true) try{ await Voice.start("en-US") // en-US }catch(err){ console.log("err", err) setRecording(false); } } const stopRecording = async () =>{ try{ await Voice.stop() setRecording(false) // fetch responce }catch(err){ console.log("err", err) } } useEffect(()=>{ console.log('use Effect cal') Voice.onSpeechStart = SpeechStartHandler; Voice.onSpeechEnd = SpeechEndHandler Voice.onSpeechResults = SpeechResultsHandler Voice.onSpeechError = SpeechErrorHandler return () =>{ // destroy the voice instance Voice.destroy().then(Voice.removeAllListeners) console.log('Event listeners removed'); } },[recording])
I add With out manual steps but the functions is not call when voice start I try couple of time but function is not triggered
on which device you are testing ur code ?
Android oppo a54
what android version ?
from voice.
same i was also getting error but this library will without any of the manual steps just install it and use it
const SpeechStartHandler =() =>{ console.log("speech start handler") } const SpeechEndHandler =() =>{ setRecording(false) console.log("speech End handler") } const SpeechResultsHandler =(e) =>{ // const recognizedText = e.value[0]; // console.log("Recognized text:", recognizedText); console.log('Resulthandler') setResult("How are you?") } const SpeechErrorHandler =(e) =>{ setRecording(false) console.log("Error handler:", e) } const startRecording = async () =>{ setRecording(true) try{ await Voice.start("en-US") // en-US }catch(err){ console.log("err", err) setRecording(false); } } const stopRecording = async () =>{ try{ await Voice.stop() setRecording(false) // fetch responce }catch(err){ console.log("err", err) } } useEffect(()=>{ console.log('use Effect cal') Voice.onSpeechStart = SpeechStartHandler; Voice.onSpeechEnd = SpeechEndHandler Voice.onSpeechResults = SpeechResultsHandler Voice.onSpeechError = SpeechErrorHandler return () =>{ // destroy the voice instance Voice.destroy().then(Voice.removeAllListeners) console.log('Event listeners removed'); } },[recording])
I add With out manual steps but the functions is not call when voice start I try couple of time but function is not triggered
on which device you are testing ur code ?
Android oppo a54
what android version ?
Android version 11
from voice.
add this in ur manifest file to make it work on android 11same i was also getting error but this library will without any of the manual steps just install it and use it
const SpeechStartHandler =() =>{ console.log("speech start handler") } const SpeechEndHandler =() =>{ setRecording(false) console.log("speech End handler") } const SpeechResultsHandler =(e) =>{ // const recognizedText = e.value[0]; // console.log("Recognized text:", recognizedText); console.log('Resulthandler') setResult("How are you?") } const SpeechErrorHandler =(e) =>{ setRecording(false) console.log("Error handler:", e) } const startRecording = async () =>{ setRecording(true) try{ await Voice.start("en-US") // en-US }catch(err){ console.log("err", err) setRecording(false); } } const stopRecording = async () =>{ try{ await Voice.stop() setRecording(false) // fetch responce }catch(err){ console.log("err", err) } } useEffect(()=>{ console.log('use Effect cal') Voice.onSpeechStart = SpeechStartHandler; Voice.onSpeechEnd = SpeechEndHandler Voice.onSpeechResults = SpeechResultsHandler Voice.onSpeechError = SpeechErrorHandler return () =>{ // destroy the voice instance Voice.destroy().then(Voice.removeAllListeners) console.log('Event listeners removed'); } },[recording])
I add With out manual steps but the functions is not call when voice start I try couple of time but function is not triggered
on which device you are testing ur code ?
Android oppo a54
what android version ?
Android version 11
from voice.
Related Issues (20)
- intergrate with WebRTC
- Offline mode HOT 1
- how will i make it work like built in voice to text system ?
- can someone tell me any other alternative library that will for same as internal voice to text service/system ?
- temporary fix for recognition stop after a short delay...now the recognition will not be stopped until the user press the stop button...here is my code
- not working there is no internet...somebody know the way to make it work offline ?
- how to make it work offline for 'en-US' language...this language is already downloaded but still its not giving results in offline mode HOT 8
- Stop Recording After Small Pause HOT 14
- does it work offline guys ? please let me know if it works offline HOT 1
- on ios i speak once but it displays the result 3 times..i have tested it on simulator for now have not tested it on physical iphone
- android 13 , {"error": {"code": "9", "message": "9/Insufficient permissions"}} HOT 1
- app is getting crashed when I'm clicking on the start recording button HOT 3
- Temporary Fixes
- :react-native-voice_voice:packageDebugResources' (type 'MergeResources') HOT 2
- `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.
- `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method. `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method. HOT 2
- Short recordings returning No Match?
- Inaccurate Speech-to-Text Recognition
- Inconsistent delay before onSpeechStart is called HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from voice.