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

Modify default max tokens for whisper #23

Open
wants to merge 1 commit into
base: master
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
4 changes: 2 additions & 2 deletions vid2cleantxt/transcribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def transcribe_video_whisper(
clip_directory,
clip_name: str,
chunk_dur: int = 30,
chunk_max_new_tokens=512,
chunk_max_new_tokens=446,
temp_dir: str = "audio_chunks",
manually_clear_cuda_cache=False,
print_memory_usage=False,
Expand All @@ -247,7 +247,7 @@ def transcribe_video_whisper(
:param clip_directory: the directory of the video file
:param str clip_name: the name of the video file
:param int chunk_dur: the duration of each chunk in seconds, default 30
:param int chunk_max_new_tokens: max new tokens generated per chunk, default 512 (arbitrary upper bound)
:param int chunk_max_new_tokens: max new tokens generated per chunk, default 446 (arbitrary upper bound)
:param str temp_dir: the directory to store the audio chunks in. default "audio_chunks"
:param bool manually_clear_cuda_cache: whether to manually clear the cuda cache after each chunk. default False
:param bool print_memory_usage: whether to print the memory usage at set interval while transcribing. default False
Expand Down