使用Google TTS在iPhone應用程序中開發,我發送了一些請求,然後我使用AVAudioPlayer播放音頻數據。iPhone中谷歌TTS中的問題?
我發送了一個請求作爲更多的單詞,然後數據爲空。谷歌TTS僅支持小型文字轉換音頻數據或更多,我想知道如此,請幫助我。
由於提前
我嘗試這樣做:
NSString *linkTTS = [NSString stringWithFormat:@"http://translate.google.com/translate_tts?tl=en&q=I+am+new+to+IPhone+development+I+am+working+on+Audio+player+i+have+to+show+the+current+time+and+estimated+time"];
NSData *dataTTS = [NSData dataWithContentsOfURL:[NSURL URLWithString:linkTTS]];
NSLog(@"dataTTS:%@",dataTTS);
_googlePlayer = [[AVAudioPlayer alloc] initWithData:dataTTS error:nil];
[_googlePlayer play];