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

Store Voice temp files in memory #386

Merged
merged 3 commits into from
Nov 2, 2023
Merged

Store Voice temp files in memory #386

merged 3 commits into from
Nov 2, 2023

Conversation

ohld
Copy link
Contributor

@ohld ohld commented Nov 1, 2023

TL;DR:
Introducing much efficient voice message handler.

  1. Download voice file to memory in io.BytesIO() buffer
  2. Upload it to openai to transcribe

Pros:

  1. No overhead on disk usage
  2. No dependencies on pydub
  3. No format conversion

In other words, it should be much faster.

@karfly
Copy link
Collaborator

karfly commented Nov 2, 2023

PERFECT. Merging...

@karfly karfly merged commit ce0c348 into father-bot:main Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants