0

Using SFSpeechURLRecognitionRequest, Trying to transcribe a 3 min Audio file (Polish language), BUT Result.isFinal called before 3 min complete. transcribe only the first 60 seconds.

any other ways to transcribe the whole 3 minutes?

just a simple code:

-(void)transcribe {

SFSpeechRecognizer * speechRecognizer = [[SFSpeechRecognizer alloc]initWithLocale:[NSLocale localeWithLocaleIdentifier:@"pl_PL"]];

[SFSpeechRecognizer requestAuthorization:^(SFSpeechRecognizerAuthorizationStatus status) {
    switch (status) {
        case SFSpeechRecognizerAuthorizationStatusAuthorized:{

            NSString * path = [[NSBundle mainBundle]pathForResource:@"polish" ofType:@"MOV"];
            NSURL * url = [NSURL fileURLWithPath:path];
            SFSpeechURLRecognitionRequest * request = [[SFSpeechURLRecognitionRequest alloc]initWithURL:url];
            [speechRecognizer recognitionTaskWithRequest:request resultHandler:^(SFSpeechRecognitionResult * _Nullable result, NSError * _Nullable error) {

                if(result.isFinal){
                    //showing only the first 60 second's results.
                }
            }];
                                
            break;
        }
        default:
            break;
    }
}];

}

Ofir Malachi
  • 1,145
  • 14
  • 20

0 Answers0