I have a wav file that plays fine in the browser:
However, it is not playing on my simulator. Is there some limitation on support for wav files in iOS?
NSString *urlString = @"https://d5e5ca34-f670-4a7f-98c7-1643d83ecc1d:[email protected]/text-to-speech/api/v1/synthesize?accept=audio/wav&voice=en-US_MichaelVoice&text=Hello%20world";
NSURL *url = [NSURL URLWithString:urlString];
NSData *audioData=[NSData dataWithContentsOfURL:url];
NSError *error;
self.player = [[AVAudioPlayer alloc] initWithData:audioData error:&error];
[self.player setVolume:1.0];
[self.player setDelegate:self];
[self.player setNumberOfLoops:0];
[self.player prepareToPlay];
[self.player play];