1
私はAVAudioPlayerを使用して1つを選んで再生したい単語の配列を持っていますが、どのようにAVAudioPlayerを使ってNSStringを再生することができますか?AVAudioPlayerを使って単語やNSStringの配列を再生するには?
私にはオーディオファイルがありません。AVAudioPlayerプログラミングを使用して各単語を再生したい単語のリストがあります。
NSString *path = [NSString stringWithFormat:@"%@/audio.mp3", [[NSBundle mainBundle] resourcePath]];
NSURL *soundUrl = [NSURL fileURLWithPath:path];
AVAudioPlayer *audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:soundUrl error:nil];
「AVSpeechSynthesizer」 – dan