Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whisper openai.AudioRequest.FilePath #265

Closed
xoba opened this issue Apr 18, 2023 · 1 comment
Closed

whisper openai.AudioRequest.FilePath #265

xoba opened this issue Apr 18, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@xoba
Copy link

xoba commented Apr 18, 2023

i would like to create whisper model transcriptions from audio in a memory-based buffer, ideally of type []byte; whereas currently the only way to identify audio in this sdk is via openai.AudioRequest.FilePath, thus it must be stored in the underlying OS's filesystem.

in my current use case, the audio file is already in a []byte buffer, never came from a filesystem in the first place, thus it feels unnecessary and artificial to explicitly store it in a temporary file and thereafter delete it in order to use whisper api via this projects sdk.

thanks!

sashabaranov pushed a commit that referenced this issue Jun 5, 2023
* Implement optional io.Reader in AudioRequest (#303) (#265)

* Fix err shadowing

* Add test to cover AudioRequest io.Reader usage

* Add additional test cases to cover AudioRequest io.Reader usage

* Add test to cover opening the file specified in an AudioRequest
@vvatanabe vvatanabe added the enhancement New feature or request label Jun 30, 2023
@vvatanabe
Copy link
Collaborator

@xoba Done #331

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants