Test WAV files from music library

Home Forums OpenEars Test WAV files from music library

Viewing 2 posts - 1 through 2 (of 2 total)

  • Author
  • #1022472


    I’m trying to test OpenEars speech recognition using previously recorded WAV-files. I created a few 16-bit WAV-file and upload them to the music library. But now I can’t take such path to the file, that it is good for runRecognitionOnWavFileAtPath method. Is it possible to use that method for the files from music library? Did anybody try to do the same?

    here is my code:
    – (IBAction) searchAction
    MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];
    mediaPicker.delegate = self;
    mediaPicker.allowsPickingMultipleItems = NO;
    [self presentViewController:mediaPicker animated:YES completion:nil];

    – (void)mediaPicker: (MPMediaPickerController *)mediaPicker didPickMediaItems:(MPMediaItemCollection *)mediaItemCollection
    [self dismissModalViewControllerAnimated:YES];

    MPMediaItem *anItem = (MPMediaItem *)[mediaItemCollection.items objectAtIndex: 0];
    NSURL *assetURL = [anItem valueForProperty: MPMediaItemPropertyAssetURL];

    NSString* filePath = [assetURL absoluteString];

    [self.pocketsphinxController runRecognitionOnWavFileAtPath:filePath usingLanguageModelAtPath:self.pathToFirstDynamicallyGeneratedLanguageModel dictionaryAtPath:self.pathToFirstDynamicallyGeneratedDictionary acousticModelAtPath:[AcousticModel pathToModel:@”AcousticModelEnglish”] languageModelIsJSGF:FALSE];


    Halle Winkler

    I have no idea – let me know what you find out about this!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.