anasfik / openai

Dart/Flutter SDK for ChatGPT and all OpenAI APIs (GPT, Dall-e..)
https://pub.dev/packages/dart_openai
MIT License
570 stars 177 forks source link

[Audio] createTranscription Added `timestamp_granularities[]` request parameter and updated response object #157

Closed mihirshahxenlabs closed 7 months ago

mihirshahxenlabs commented 7 months ago

Fixes #156

As per the docs: https://platform.openai.com/docs/api-reference/audio/createTranscription Added timestamp_granularities[] in request parameter

As per the docs: https://platform.openai.com/docs/api-reference/audio/verbose-json-object Added task, language, duration, words, segment in response object. This is used when responseType is verbose_json


Note: Adding both values words and segments to the parameter timestamp_granularities, doesn't work.

anasfik commented 7 months ago

Very cool, thank you!

anasfik commented 7 months ago

I did make use of it in the example/create_audio_transcription.dart.