Skip to content

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

@alitele

Description

@alitele

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions