Skip to content

Commit

Permalink
πŸ†™ Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
kadirnar committed May 4, 2024
1 parent e27f4dd commit 6729c6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@ from transformers import BitsAndBytesConfig, HqqConfig
url = "https://www.youtube.com/watch?v=di3rHkEZuUw"
audio_path = download_and_convert_to_mp3(url)

quant_config = HqqConfig(
nbits=1, group_size=64, quant_zero=False, quant_scale=False, axis=0
hqq_config = HqqConfig(
nbits=1,
group_size=64,
quant_zero=False,
quant_scale=False,
axis=0,
offload_meta=False,
) # axis=0 is used by default


bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
Expand All @@ -52,11 +56,11 @@ bnb_config = BitsAndBytesConfig(
)

pipeline = SpeechToTextPipeline(
model_id="distil-whisper/distil-large-v3", quant_config=quant_config
model_id="distil-whisper/distil-large-v3", quant_config=hqq_config
) # or bnb_config

transcript = pipeline(
audio_path="test.mp3",
audio_path=audio_path,
chunk_length_s=30,
stride_length_s=5,
max_new_tokens=128,
Expand Down
2 changes: 1 addition & 1 deletion whisperplus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
from whisperplus.utils.download_utils import download_and_convert_to_mp3
from whisperplus.utils.text_utils import format_speech_to_dialogue

__version__ = '0.2.7.2.dev1'
__version__ = '0.3.0'
__author__ = 'kadirnar'
__license__ = 'Apache License 2.0'

0 comments on commit 6729c6e

Please sign in to comment.