0

I am using google speech to text app, for converting speech into text. speech is buffered in AudioBufferList and further converted into Data. when I am trying to play same Data in AvudioPlayer using its init method "AVAudioPlayer(contentOf: Data)" it not playing. gives me error "OSStatus 1954115647" which is unsupported file type.

I have tried playing an .WAV file after converting .WAV file into Data, it works fine.

I expect to play the buffered audio in AVAudioPlayer.

chetan panchal
  • 181
  • 2
  • 11
  • what is the format of the data? It is probably an issue with the way the Data is created, maybe extra bytes at the beginning or end need to be stripped. – meggar Jan 16 '19 at 15:08
  • @meggar type of data is AudioBufferList – chetan panchal Jan 17 '19 at 10:01
  • can you show your code? – meggar Jan 17 '19 at 13:10
  • @meggar if you have used google speech to text api in iOS, one of its method processSampleData in which audioData is passed of type Data, I am trying to play same data in AVAudioPlayer but it is giving me error "OSStatus 1954115647" – chetan panchal Jan 17 '19 at 13:45

0 Answers0