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

use av library instead baby! #194

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BBC-Esq
Copy link

@BBC-Esq BBC-Esq commented Mar 31, 2024

Use the "av" library instead, which "just makes sense" since faster-library already uses it anyways. This removes the pyaudio dependency as well as that of scipy and numpy. It also obviates users having to install ffmpeg since av is basically a wrapper for ffmpeg.

Here's what the faster-whisper repo says about it:

image

I didn't have the time to analyze other scripts for their use of pyaudio, ffmpeg via command line, scipy, etc., but I image that there are places you can use av instead to make things faster, easier for the user, and to simplify the code and reduce the amount of requirements.

It also uses PathLib instead of string manipulation. I'm a big fan of pathlib because of its syntax and it's more platform independent.

As always, let's discuss before implementing!

Use the "av" library instead, which "just makes sense" since ```faster-library``` already uses it anyways.  This removes the ```pyaudio``` dependency as well as that of ```scipy``` and ```numpy```.  It also obviates having to rely on users to know how to install ffmpeg since ```av``` is basically a wrapper for ffmpeg.
@BBC-Esq BBC-Esq changed the title us av library instead baby! use av library instead baby! Mar 31, 2024
@makaveli10
Copy link
Collaborator

makaveli10 commented Apr 4, 2024

@BBC-Esq Looks good to me, thanks for putting this together.
Although, i see this warning in the resampling process:

Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
Encoder did not produce proper pts, making some up.

@BBC-Esq
Copy link
Author

BBC-Esq commented Aug 3, 2024

I get the same error message but it doesn't seem to affect the quality or speed of the transcriptions. It might have something to do with timestamps though..Thoughts?

https://superuser.com/questions/1226305/ffmpeg-warning-timestamps-are-unset-in-a-packet-when-converting-h264-to-mp4

https://stackoverflow.com/questions/48927762/ffmpeg-timestamps-are-unset-in-a-packet-for-stream-0-non-monotonous-dts-in-outp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants