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

Missing support for m4a audio files for the Whisper speech-to-text API #53

Closed joshgalvan closed 1 year ago

joshgalvan commented 1 year ago

Currently there is no support for m4a files. Is it as simple as implementing case m4a = "audio/m4a in MIMEType.Audio?

Also, it seems the default way to record audio in iOS using AVFoundation and AVAudioRecord is to create .m4a files, making it necessary to support.

joshgalvan commented 1 year ago

I tested it, and it is as simple as adding the above case. Works with .m4a audio files creates using AVAudioRecord. Will create PR for this issue.