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

Update transcribe.py #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package/whisper-at/whisper_at/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def transcribe(
#print(mel.shape)
content_frames = mel.shape[-1] - N_FRAMES

at_decision_window = at_time_res * 100 # in number of frames
at_decision_window = round(at_time_res * 100, 5) # in number of frames
assert at_decision_window % 40 == 0, "Audio tagging resolution at_time_res must be an integer multiple of 0.4 second, e.g., 0.4, 0.8, 1.2, etc, current at_time_res={:.2f}.".format(at_time_res)
if at_decision_window != 1000:
warn_msg = "Current at_time_res is {:.2f} second, the audio tagging model is trained with time resolution of 10 seconds. Mismatch time resolution may cause an audio tagging performance drop, but won't impact ASR performance.".format(at_time_res)
Expand Down