Giter VIP home page Giter VIP logo

Comments (8)

MuhammadAhmed-Developer avatar MuhammadAhmed-Developer commented on June 2, 2024

implementation project(':@react-native-community_voice')
image
After that also show different error that is below
image
I don't know how to fix this issue If yoou know tell me

from voice.

codding123vbf avatar codding123vbf commented on June 2, 2024

same i was also getting error but this library will without any of the manual steps just install it and use it

from voice.

MuhammadAhmed-Developer avatar MuhammadAhmed-Developer commented on June 2, 2024

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.

codding123vbf avatar codding123vbf commented on June 2, 2024

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.

MuhammadAhmed-Developer avatar MuhammadAhmed-Developer commented on June 2, 2024

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.

codding123vbf avatar codding123vbf commented on June 2, 2024

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.

MuhammadAhmed-Developer avatar MuhammadAhmed-Developer commented on June 2, 2024

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.

codding123vbf avatar codding123vbf commented on June 2, 2024

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

add this in ur manifest file to make it work on android 11

from voice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.