jamsch / expo-speech-recognition

Speech Recognition for React Native Expo projects
MIT License
113 stars 10 forks source link

Multiple People #13

Open IsaacJuracich opened 2 months ago

IsaacJuracich commented 2 months ago

The library doesn't seem to pick up audio for more than one person, works perfectly when one person is speaking but once multiple people are speaking it doesn't seem to work.

jamsch commented 2 months ago

Hi @IsaacJuracich,

Unfortunately neither the Android SpeechRecognizer and iOS SFSpeechRecognizer have the capability for speaker diarization so you'll need to use a different API.

In the future, if Android or iOS do implement those capabilities in, I indend to add the speaker ID to the result segments API:

{
  transcript: "...",
  segments: Array<{
     speaker: number;
     startTimeMillis: number;
     endTimeMillis: number;
     segment: string;
     confidence: number;
  }>
}