Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native Screen Recorder and Voice Recogniser does not work together #468

Open
alitele opened this issue Dec 3, 2023 · 0 comments
Open

Comments

@alitele
Copy link

alitele commented Dec 3, 2023

I am trying to use speech to text functionality in react native and while at the same time doing this i want to record the screen as well. I have implemented both libraries

react-native-record-screen and @react-native-community/voice which works fine only if i run one at a time and not work together. I am not sure if there is any clash internally over threads or code part on native sides of their modeules. I tried this on both android and iOS and results are same.

Below is the set of two functions that I use to start stop recording and speech to text

  const startRecording = async () => {
    try {
      await Voice.start('en-Us');
      await RecordScreen.stopRecording();
    } catch (error) {
       console.log('startRecording Error >>>>', error);
    }
  };
const stopRecording = async () => {
    try {
      await Voice.stop();
      await RecordScreen.stopRecording();
    } catch (error) {
      console.log('stopRecording Error >>>>', error);
    }
  };

Kindly suggest if there is any issue in implementation ? Appreciate you help.Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant