-
Notifications
You must be signed in to change notification settings - Fork 36
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
suppress or remove annoying print statement #40
Comments
In future all the print statements will get replaced by a logger (so that users can set the logging level as per their need). I will suppress the above FFMPEG log in next PR. No plan to remove FFMPEG, direct calls to FFMPEG is clean and faster than most of the wrappers like ffmpeg_python (open-whisper uses it) or PyAV. Direct calls also make it super-easy to run the resampling command in background in a separate thread. |
Just to play devil's advocate, don't you think that it introduces unneeded complexity for users of various platforms though? I mean...when I started learning about programming I didn't even know what a computer system "path" was let alone how to install ffmpeg and add it to the path. Plus, there's a lot of different platforms out there and different installation procedures for each one. With something like pyav you simply pip install the library...How much of a slowdown are we discussing versus directly calling ffmpeg? Anyways, if you're curious, here's how I did the resampling with pyav in my script:
I couldn't get the resampling to work automatically using In another script of mine, resampling is avoided by directly sampling into 16000 mono from the beginning. This pertains to a voice recorder functionality though, not an audio file that's who knows what the original sample rate is...
|
Depends on the file size for example say if resampling takes 5 secs for some 1 hour files. And you have 20 such files in a request. Overall reduction will be ~ 5*19 secs. Because WhisperS2T runs ffmpeg cmd in a separate thread > it resamples the first audio file and send it for transcription and > in parallel resampling of other audio files are done in the background. Same thing can be done with PyAV (not sure though -- depends if PyAV interface is blocking or non-blocking).
Weird.. what system you are using? What's the exact issue? |
Thanks for the explanation, makes sense and is interesting to know...Every little bit helps I suppose when you're talking about improving speed overall. If I have time today I'll try to revert my script to what it was when I encountered the error - i.e. before I implemented pyav...but unfortunately it's difficult because I don't use any "versioning" workflow. I'm just using Notepad++...don't laugh. ;-) I do know that this script wasn't automatically resampling and was giving an error that it couldn't process the audio file without it being resampled first. ALSO THIS MAY HAVE BEEN with a different file than the Sam Altman. I'm testing it on .mp3, .wma, .flac, and .wav. Hope that helps... |
Can we please please have a way to remove this message...Every time I run the program from my python script it checks for ffmpeg, which is fine, but i wish there was a way to remove or temporarily suppress it. I have important messages printed to the command prompt when my program runs and this clutters it up...
Also, is there a way to REMOVE FFMPEG requirement entirely? For example, the
pyav
library includes it when you pip install that library.https://pypi.org/project/av/
This is why the
faster-whisper
library uses it. See here:https://github.com/SYSTRAN/faster-whisper
Anyways, here is the print that's annoying me:
The text was updated successfully, but these errors were encountered: