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

feat(audio): Add helper method to downsize audio records #194

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

ERosendo
Copy link
Contributor

This PR introduces a new helper method named convert_to_ogg which uses ffmpeg to convert media files to the OGG format with the following specifications:

  • Single audio channel and 8 kHz sampling rate (-b:a 8k)
  • Optimized for voice over IP applications (-application voip)
  • Crisp audio at smaller file sizes.

Additionally, this PR updates the audio endpoint to support Ogg conversion and removes the file extension from the temporary filepath. This enhancement enables more flexible output formatting.

Copy link

sentry-io bot commented Jun 26, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: doctor/views.py

Function Unhandled Issue
convert_audio OSError: file not found: /tmp/audio_29dfe5eb51ce4ac9836427ae84a9946b.mp3 ...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

@ERosendo ERosendo marked this pull request as ready for review June 26, 2024 20:45
Copy link
Member

@mlissner mlissner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me, but we should add a few lines to the readme too, please.

@ERosendo
Copy link
Contributor Author

Sure!

@ERosendo ERosendo force-pushed the feat-adds-helper-method-to-downsize-audio-files branch from 84d8b39 to 2114dc8 Compare June 26, 2024 22:52
@ERosendo ERosendo requested a review from mlissner June 26, 2024 23:17
@mlissner mlissner merged commit 0d34837 into main Jun 27, 2024
10 checks passed
@mlissner mlissner deleted the feat-adds-helper-method-to-downsize-audio-files branch June 27, 2024 01:41
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