dylanshine / openai-kit

A community Swift package used to interact with the OpenAI API
https://platform.openai.com/docs/api-reference
MIT License
692 stars 107 forks source link

Add .m4a audio support to speech-to-text API. #54

Closed joshgalvan closed 1 year ago

joshgalvan commented 1 year ago

Solves issue #53. Personally tested on my end to work with audio files created by AVAudioRecorder using settings of:

[ 
  AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
  AVSampleRateKey: 12000,
  AVNumberOfChannelsKey: 1,
  AVEncoderAudioQualityKey: AVAudioQuality.max.rawValue
]