From 8f072ecd0f11d8748594f078d7940f6a803720ac Mon Sep 17 00:00:00 2001 From: kadirnar Date: Tue, 14 May 2024 01:33:15 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=8F=20Add=20Lightning=20Mlx=20code=20t?= =?UTF-8?q?o=20readme=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a6e8d30..1a14ad1 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,19 @@ text = mlx_whisper.transcribe( print(text) ``` +### 🍏 Lightning Mlx Whisper + +```python +from whisperplus.pipelines.lightning_whisper_mlx import LightningWhisperMLX +from whisperplus import download_youtube_to_mp3 + +url = "https://www.youtube.com/watch?v=1__CAdTJ5JU" +audio_path = download_youtube_to_mp3(url) + +whisper = LightningWhisperMLX(model="distil-large-v3", batch_size=12, quant=None) +output = whisper.transcribe(audio_path=audio_path)["text"] +``` + ### 📰 Summarization ```python