tafrigh


Nametafrigh JSON
Version 1.1.2 PyPI version JSON
download
home_page
Summaryتفريغ النصوص وإنشاء ملفات SRT و VTT باستخدام نماذج Whisper وتقنية wit.ai.
upload_time2023-12-11 13:45:31
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2023 الكتب المُيسّرة Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords tafrigh speech-to-text wit.ai whisper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src="https://user-images.githubusercontent.com/7662492/229289746-89c5a4c7-afa6-4d46-a0e6-63dfdeb98285.jpg" style="width: 100%;"/>
</p>

<div align="center">
  <a href="https://pypi.org/project/tafrigh" target="_blank"><img src="https://img.shields.io/pypi/v/tafrigh?label=PyPI%20Version&color=limegreen" /></a>
  <a href="https://pypi.org/project/tafrigh" target="_blank"><img src="https://img.shields.io/pypi/pyversions/tafrigh?color=limegreen" /></a>
  <a href="https://github.com/ieasybooks/tafrigh/blob/main/LICENSE" target="_blank"><img src="https://img.shields.io/pypi/l/tafrigh?color=limegreen" /></a>
  <a href="https://pepy.tech/project/tafrigh" target="_blank"><img src="https://static.pepy.tech/badge/tafrigh" /></a>

  <a href="https://github.com/ieasybooks/tafrigh/actions/workflows/formatter.yml" target="_blank"><img src="https://github.com/ieasybooks/tafrigh/actions/workflows/formatter.yml/badge.svg" /></a>
  <a href="https://sonarcloud.io/summary/new_code?id=ieasybooks_tafrigh" target="_blank"><img src="https://sonarcloud.io/api/project_badges/measure?project=ieasybooks_tafrigh&metric=code_smells" /></a>
  <a href="https://tafrigh.ieasybooks.com" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" /></a>
</div>

<h1 dir="rtl">تفريغ</h1>

<p dir="rtl">تفريغ المواد المرئية أو المسموعة إلى نصوص.</p>

<p dir="rtl">يمكنك الاطلاع على أمثلة تم تفريغها باستخدام تفريغ من <a href="https://drive.google.com/drive/folders/1mwdJ9t4tiu8jFGosvNsq8SL54HoQMB8G?usp=sharing">هنا</a>.</p>

<h2 dir="rtl">مميزات تفريغ</h2>

<ul dir="rtl">
  <li>تفريغ المواد المرئي والمسموع إلى نصوص باستخدام أحدث تقنيات الذكاء الاصطناعي المقدمة من شركة OpenAI</li>
  <li>إمكانية تفريغ المواد باستخدام تقنيات wit.ai المقدمة من شركة Facebook</li>
  <li>تحميل المحتوى المرئي بشكل مباشر من منصة YouTube سواءً كان المستهدف مادة واحدة أو قائمة تشغيل كاملة</li>
  <li>توفير صيَغ مخرجات مختلفة كـ <code>txt</code> و <code>srt</code> و <code>vtt</code> و <code>csv</code> و <code>tsv</code> و <code>json</code></li>
</ul>

<h2 dir="rtl">متطلبات الاستخدام</h2>

<ul dir="rtl">
  <li>يُفضّل وجود معالج رسوميات قوي في حاسبك في حال استخدام نماذج Whisper</li>
  <li>تثبيت لغة Python بإصدار 3.9 أو أعلى على حاسبك</li>
  <li>تثبيت برمجية <a href="https://ffmpeg.org">FFmpeg</a> على حاسبك</li>
  <li>تثبيت برمجية <a href="https://github.com/yt-dlp/yt-dlp">yt-dlp</a> على حاسبك</li>
</ul>

<h2 dir="rtl">تثبيت تفريغ</h2>

<h3 dir="rtl">من خلال <code>pip</code></h3>

<p dir="rtl">يمكنك تثبيت تفريغ من خلال <code>pip</code> باستخدام الأمر: <code dir="ltr">pip install tafrigh[wit,whisper]</code></p>

<h3 dir="rtl">من خلال الشيفرة المصدرية</h3>

<ul dir="rtl">
  <li>قم بتنزيل هذا المستودع من خلال الضغط على Code ثم Download ZIP أو من خلال تنفيذ الأمر التالي: <code>git clone git@github.com:ieasybooks/tafrigh.git</code></li>
  <li>قم بفك ضغط الملف إذا قمت بتنزيله بصيغة ZIP وتوجّه إلى مجلد المشروع</li>
  <li>قم بتنفيذ الأمر التالي لتثبيت تفريغ: <code dir="ltr">pip install .[wit,whisper]</code></li>
</ul>

<h3 dir="rtl">من خلال مستودع GitHub</h3>

<p dir="rtl">يمكن تثبيت تفريغ من خلال مستودع GitHub مباشرة عن طريق تنفيذ الأمر: <code dir="ltr">pip install "tafrigh[wit,whisper] @ git+https://github.com/ieasybooks/tafrigh"</code>.</p>

<p dir="rtl">يمكنك تحديد الاعتماديات التي تريد تثبيتها حسب نوع التقنية التي تريد استخدامها من خلال كتابة <code>wit</code> أو <code>whisper</code> بين قوسين مربعين كما هو موضّح في الأوامر السابقة.</p>

<h2 dir="rtl">استخدام تفريغ</h2>

<h3 dir="rtl">الخيارات المتوفرة</h3>

<ul dir="rtl">
  <li>
    المدخلات
    <ul dir="rtl">
      <li>الروابط أو مسارات الملفات: يجب تمرير الروابط أو مسارات الملفات للمواد المُراد تفريغها بعد اسم أداة تفريغ بشكل مباشر. على سبيل المثال: <code dir="ltr">tafrigh "https://yout..." "https://yout..." "C:\Users\ieasybooks\leactue.wav"</code></li>
      <li>تخطي عملية التفريغ في حال وجود المخرجات مسبقًا: يمكن تمرير الاختيار <code dir="ltr">--skip_if_output_exist</code> لتخطي عملية التفريغ إذا كانت المخرجات المطلوبة موجودة بالفعل في مجلد الإخراج المحدد</li>
      <li>المواد المُراد تفريفها من قائمة التشغيل: يمكن تحديد نطاق معين من المواد ليتم تفريغه من قائمة التشغيل من خلال الاختيار <code dir="ltr">--playlist_items</code> من خلال تمرير قيمة على صيغة <code dir="ltr">"[START]:[STOP][:STEP]"</code>. على سبيل المثال، عند تمرير <code dir="ltr">2:5</code> سيتم تحميل المواد من <code>2</code> إلى <code>5</code> من قائمة التشغيل. هذا الاختيار يُؤثّر على كل قوائم التشغيل التي يتم تمريرها كمدخلات لتفريغ</li>
    </ul>
  </li>

  <li>
    خيارات تقنية Whisper
    <ul dir="rtl">
      <li>
        النموذج: يمكنك تحديد النموذج من خلال الاختيار <code dir="ltr">--model_name_or_path</code>. النماذج المتوفرة:
        <ul dir="rtl">
          <li><code dir="ltr">tiny.en</code> (لغة انجليزية فقط)</li>
          <li><code dir="ltr">tiny</code> (الأقل دقة)</li>
          <li><code dir="ltr">base.en</code> (لغة انجليزية فقط)</li>
          <li><code dir="ltr">base</code></li>
          <li><code dir="ltr">small.en</code> (لغة انجليزية فقط)</li>
          <li><code dir="ltr">small</code> <strong>(الاختيار الإفتراضي)</strong></li>
          <li><code dir="ltr">medium.en</code> (لغة انجليزية فقط)</li>
          <li><code dir="ltr">medium</code></li>
          <li><code dir="ltr">large-v1</code></li>
          <li><code dir="ltr">large-v2</code></li>
          <li><code dir="ltr">large</code> (الأعلى دقة)</li>
          <li>اسم نموذج Whisper موجود على HuggingFace Hub</li>
          <li>مسار نموذج Whisper تم تحميلة مسبقًا</li>
          <li>مسار نموذج Whisper تم تحويله باستخدام أداة <a href="https://opennmt.net/CTranslate2/guides/transformers.html"><code>ct2-transformers-converter</code></a> لاستخدام المكتبة السريعة <a href="https://github.com/guillaumekln/faster-whisper"><code>faster-whisper</code></a></li>
        </ul>
      </li>
      <li>
        المهمة: يمكنك تحديد المهمة من خلال الاختيار <code dir="ltr">--task</code>. المهمات المتوفرة:
        <ul dir="rtl">
          <li><code dir="ltr">transcribe</code>: تحويل الصوت إلى نص <strong>(الاختيار الإفتراضي)</strong></li>
          <li><code dir="ltr">translation</code>: ترجمة الصوت إلى نص باللغة الانجليزية</li>
        </ul>
      </li>
      <li>اللغة: يمكنك تحديد لغة الصوت من خلال الاختيار <code dir="ltr">--language</code>. على سبيل المثال، لتحديد اللغة العربية قم بتمرير <code dir="ltr">ar</code>. إذا لم يتم تحديد اللغة، سيتم التعرف عليها تلقائيا</li>
      <li>استخدام نسخة أسرع من نماذج Whisper: من خلال تمرير الاختيار <code dir="ltr">--use_faster_whisper</code> سيتم استخدام النسخة الأسرع من نماذج Whisper</li>
      <li>حجم نطاق البحث: يمكنك تحسين النتائج باستخدام اختيار <code dir="ltr">--beam_size</code> والذي يسمح لك بإجبار النموذج على البحث في نطاق أوسع من الكلمات أثناء إنشاء النص. القيمة الإفتراضية هي <code>5</code></li>
      <li>
        طريقة ضغط النموذج: يمكنك تحديد الطريقة التي تم بها ضغط النموذج أثناء تحويله باستخدام أداة <a href="https://opennmt.net/CTranslate2/guides/transformers.html"><code>ct2-transformers-converter</code></a> من خلال تمرير الاختيار <code dir="ltr">--ct2_compute_type</code>. الطرق المتوفرة:
        <ul dir="rtl">
          <li><code dir="ltr">default</code> <strong>(الاختيار الإفتراضي)</strong></li>
          <li><code dir="ltr">int8</code></li>
          <li><code dir="ltr">int8_float16</code></li>
          <li><code dir="ltr">int16</code></li>
          <li><code dir="ltr">float16</code></li>
        </ul>
      </li>
    </ul>
  </li>

  <li>
    خيارات تقنية Wit
    <ul dir="rtl">
      <li>مفاتيح <a href="wit.ai">wit.ai</a>: يمكنك استخدام تقنيات <a href="wit.ai">wit.ai</a> لتفريغ المواد إلى نصوص من خلال تمرير المفتاح أو المفاتيح الخاصة بك للاختيار <code dir="ltr">--wit_client_access_tokens</code>. إذا تم تمرير هذا الاختيار، سيتم استخدام <a href="wit.ai">wit.ai</a> لتفريغ المواد إلى نصوص. غير ذلك، سيتم استخدام نماذج Whisper</li>
      <li>تحديد أقصى مدة للتقطيع: يمكنك تحديد أقصى مدة للتقطيع والتي ستؤثر على طول الجمل في ملفات SRT و VTT من خلال تمرير الاختيار <code dir="ltr">--max_cutting_duration</code>. القيمة الافتراضية هي <code>15</code></li>
    </ul>
  </li>

  <li>
    المخرجات
    <ul dir="rtl">
      <li>ضغط الأجزاء: يمكنك استخدام الاختيار <code dir="ltr">--min_words_per_segment</code> للتحكم في أقل عدد من الكلمات التي يمكن أن تكون داخل جزء واحد من أجزاء التفريغ. القيمة الإفتراضية هي <code>1</code>، يمكنك تمرير <code>0</code> لتعطيل هذه الخاصية</li>
      <li>يمكنك تمرير الاختيار <code dir="ltr">--save_files_before_compact</code> لحفظ الملفات الأصلية قبل أن يتم دمج أجزائها بناء على اختيار <code dir="ltr">--min_words_per_segment</code></li>
      <li>يمكنك حفظ مخرجات مكتبة <code>yt-dlp</code> بصيغة <code>json</code> من خلال تمرير الاختيار <code dir="ltr">--save_yt_dlp_responses</code></li>
      <li>إخراج عينة من الأجزاء بعد الدمج: يمكنك تمرير قيمة للاختيار <code dir="ltr">--output_sample</code> للحصول على عينة عشوائية من جميع الأجزاء التي تم تفريغها من كل المواد بعد دمجها بناء على اختيار <code dir="ltr">--min_words_per_segment</code>. القيمة الافتراضية هي <code>0</code>، أي أنه لن يتم إخراج أي عينات</li>
      <li>
        صيغة المخرجات: يمكنك تحديد صيغة المخرجات من خلال الاختيار <code dir="ltr">--output_formats</code>. الصيغ المتوفرة:
        <ul dir="rtl">
          <li><code dir="ltr">txt</code></li>
          <li><code dir="ltr">srt</code></li>
          <li><code dir="ltr">vtt</code></li>
          <li><code dir="ltr">csv</code></li>
          <li><code dir="ltr">tsv</code></li>
          <li><code dir="ltr">json</code></li>
          <li><code dir="ltr">all</code> <strong>(الاختيار الإفتراضي)</strong></li>
          <li><code dir="ltr">none</code> (لن يتم إنشاء ملف في حال تمرير هذه الصيغة)</li>
        </ul>
      </li>
      <li>مجلد المخرجات: يمكنك تحديد مجلد الاخراج من خلال الاختيار <code dir="ltr">--output_dir</code>. بشكل تلقائي سيكون المجلد الحالي هو مجلد الاخراج إذا لم يتم تحديده</li>
    </ul>
  </li>
</ul>

```
➜ tafrigh --help
usage: tafrigh [-h] [--version] [--skip_if_output_exist | --no-skip_if_output_exist] [--playlist_items PLAYLIST_ITEMS] [--verbose | --no-verbose] [-m MODEL_NAME_OR_PATH] [-t {transcribe,translate}]
               [-l {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh}]
               [--use_faster_whisper | --no-use_faster_whisper] [--beam_size BEAM_SIZE] [--ct2_compute_type {default,int8,int8_float16,int16,float16}] [-w WIT_CLIENT_ACCESS_TOKENS [WIT_CLIENT_ACCESS_TOKENS ...]]
               [--max_cutting_duration [1-17]] [--min_words_per_segment MIN_WORDS_PER_SEGMENT] [--save_files_before_compact | --no-save_files_before_compact] [--save_yt_dlp_responses | --no-save_yt_dlp_responses]
               [--output_sample OUTPUT_SAMPLE] [-f {all,txt,srt,vtt,csv,tsv,json,none} [{all,txt,srt,vtt,csv,tsv,json,none} ...]] [-o OUTPUT_DIR]
               urls_or_paths [urls_or_paths ...]

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

Input:
  urls_or_paths         Video/Playlist URLs or local folder/file(s) to transcribe.
  --skip_if_output_exist, --no-skip_if_output_exist
                        Whether to skip generating the output if the output file already exists. (default: False)
  --playlist_items PLAYLIST_ITEMS
                        Comma separated playlist_index of the items to download. You can specify a range using "[START]:[STOP][:STEP]".
  --verbose, --no-verbose
                        Whether to print out the progress and debug messages. (default: False)

Whisper:
  -m MODEL_NAME_OR_PATH, --model_name_or_path MODEL_NAME_OR_PATH
                        Name or path of the Whisper model to use.
  -t {transcribe,translate}, --task {transcribe,translate}
                        Whether to perform X->X speech recognition ('transcribe') or X->English translation ('translate').
  -l {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh}, --language {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh}
                        Language spoken in the audio, skip to perform language detection.
  --use_faster_whisper, --no-use_faster_whisper
                        Whether to use Faster Whisper implementation. (default: False)
  --beam_size BEAM_SIZE
                        Number of beams in beam search, only applicable when temperature is zero.
  --ct2_compute_type {default,int8,int8_float16,int16,float16}
                        Quantization type applied while converting the model to CTranslate2 format.

Wit:
  -w WIT_CLIENT_ACCESS_TOKENS [WIT_CLIENT_ACCESS_TOKENS ...], --wit_client_access_tokens WIT_CLIENT_ACCESS_TOKENS [WIT_CLIENT_ACCESS_TOKENS ...]
                        List of wit.ai client access tokens. If provided, wit.ai APIs will be used to do the transcription, otherwise whisper will be used.
  --max_cutting_duration [1-17]
                        The maximum allowed cutting duration. It should be between 1 and 17.

Output:
  --min_words_per_segment MIN_WORDS_PER_SEGMENT
                        The minimum number of words should appear in each transcript segment. Any segment have words count less than this threshold will be merged with the next one. Pass 0 to disable this behavior.
  --save_files_before_compact, --no-save_files_before_compact
                        Saves the output files before applying the compact logic that is based on --min_words_per_segment. (default: False)
  --save_yt_dlp_responses, --no-save_yt_dlp_responses
                        Whether to save the yt-dlp library JSON responses or not. (default: False)
  --output_sample OUTPUT_SAMPLE
                        Samples random compacted segments from the output and generates a CSV file contains the sampled data. Pass 0 to disable this behavior.
  -f {all,txt,srt,vtt,csv,tsv,json,none} [{all,txt,srt,vtt,csv,tsv,json,none} ...], --output_formats {all,txt,srt,vtt,csv,tsv,json,none} [{all,txt,srt,vtt,csv,tsv,json,none} ...]
                        Format of the output file; if not specified, all available formats will be produced.
  -o OUTPUT_DIR, --output_dir OUTPUT_DIR
                        Directory to save the outputs.
```

<h3 dir="rtl">التفريغ من خلال سطر الأوامر</h3>

<h4 dir="rtl">التفريغ باستخدام نماذج Whisper</h4>

<h5 dir="rtl">تفريغ مقطع واحد</h5>

```
tafrigh "https://youtu.be/dDzxYcEJbgo" \
  --model_name_or_path small \
  --task transcribe \
  --language ar \
  --output_dir . \
  --output_formats txt srt
```

<h5 dir="rtl">تفريغ قائمة تشغيل كاملة</h5>

```
tafrigh "https://youtube.com/playlist?list=PLyS-PHSxRDxsLnVsPrIwnsHMO5KgLz7T5" \
  --model_name_or_path small \
  --task transcribe \
  --language ar \
  --output_dir . \
  --output_formats txt srt
```

<h5 dir="rtl">تفريغ أكثر من مقطع</h5>

```
tafrigh "https://youtu.be/4h5P7jXvW98" "https://youtu.be/jpfndVSROpw" \
  --model_name_or_path small \
  --task transcribe \
  --language ar \
  --output_dir . \
  --output_formats txt srt
```

<h5 dir="rtl">تسريع عملية التفريغ</h5>

<p dir="rtl">يمكنك استخدام مكتبة <code><a href="https://github.com/guillaumekln/faster-whisper">faster_whisper</a></code> التي توفّر سرعة أكبر في تفريغ المواد من خلال تمرير الاختيار <code dir="ltr">--use_faster_whisper</code> كالتالي:</p>

```
tafrigh "https://youtu.be/3K5Jh_-UYeA" \
  --model_name_or_path large \
  --task transcribe \
  --language ar \
  --use_faster_whisper \
  --output_dir . \
  --output_formats txt srt
```

<h4 dir="rtl">التفريغ باستخدام تقنية wit.ai</h4>

<h5 dir="rtl">تفريغ مقطع واحد</h5>

```
tafrigh "https://youtu.be/dDzxYcEJbgo" \
  --wit_client_access_tokens XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
  --output_dir . \
  --output_formats txt srt \
  --min_words_per_segment 10 \
  --max_cutting_duration 10
```

<h5 dir="rtl">تفريغ قائمة تشغيل كاملة</h5>

```
tafrigh "https://youtube.com/playlist?list=PLyS-PHSxRDxsLnVsPrIwnsHMO5KgLz7T5" \
  --wit_client_access_tokens XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
  --output_dir . \
  --output_formats txt srt \
  --min_words_per_segment 10 \
  --max_cutting_duration 10
```

<h5 dir="rtl">تفريغ أكثر من مقطع</h5>

```
tafrigh "https://youtu.be/4h5P7jXvW98" "https://youtu.be/jpfndVSROpw" \
  --wit_client_access_tokens XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
  --output_dir . \
  --output_formats txt srt \
  --min_words_per_segment 10 \
  --max_cutting_duration 10
```

<h3 dir="rtl">التفريغ من خلال الشيفرة البرمجية</h3>

<p dir="rtl">يمكنك استخدام تفريغ من خلال الشيفرة البرمجية كالتالي:</p>

```python
from tafrigh import farrigh, Config

if __name__ == '__main__':
  config = Config(
    urls_or_paths=['https://youtu.be/qFsUwp5iomU'],
    skip_if_output_exist=False,
    playlist_items='',
    verbose=False,
    model_name_or_path='tiny',
    task='transcribe',
    language='ar',
    use_faster_whisper=True,
    beam_size=5,
    ct2_compute_type='default',
    wit_client_access_tokens=[],
    max_cutting_duration=10,
    min_words_per_segment=10,
    save_files_before_compact=False,
    save_yt_dlp_responses=False,
    output_sample=0,
    output_formats=['txt', 'srt'],
    output_dir='.',
  )

  for progress in farrigh(config):
    print(progress)
```

<p dir="rtl">دالة "فَرِّغْ" <code>farrigh</code> هي عبارة عن مُوَلِّدْ (Generator) يقوم بتوليد الحالة الحالية للتفريغ وأين وصلت العملية. إذا لم تكن بحاجة إلى تتبع هذا الأمر، يمكنك الاستغناء عن حلقة الدوران من خلال استخدام <code>deque</code> كالتالي:</p>

```python
from collections import deque

from tafrigh import farrigh, Config

if __name__ == '__main__':
  config = Config(...)

  deque(farrigh(config), maxlen=0)
```

<hr>

<p dir="rtl">تم الاعتماد بشكل كبير على مستودع <a href="https://github.com/m1guelpf/yt-whisper">yt-whisper</a> لإنجاز تفريغ بشكل أسرع.</p>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tafrigh",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "tafrigh,speech-to-text,wit.ai,whisper",
    "author": "",
    "author_email": "\u0627\u0644\u0643\u062a\u0628 \u0627\u0644\u0645\u064c\u064a\u0633\u0651\u0631\u0629 <easybooksdev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/11/dd/892eba807358608180499344633142a3ed945c26bb064dc94c075c855222/tafrigh-1.1.2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\"https://user-images.githubusercontent.com/7662492/229289746-89c5a4c7-afa6-4d46-a0e6-63dfdeb98285.jpg\" style=\"width: 100%;\"/>\n</p>\n\n<div align=\"center\">\n  <a href=\"https://pypi.org/project/tafrigh\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/v/tafrigh?label=PyPI%20Version&color=limegreen\" /></a>\n  <a href=\"https://pypi.org/project/tafrigh\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/pyversions/tafrigh?color=limegreen\" /></a>\n  <a href=\"https://github.com/ieasybooks/tafrigh/blob/main/LICENSE\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/l/tafrigh?color=limegreen\" /></a>\n  <a href=\"https://pepy.tech/project/tafrigh\" target=\"_blank\"><img src=\"https://static.pepy.tech/badge/tafrigh\" /></a>\n\n  <a href=\"https://github.com/ieasybooks/tafrigh/actions/workflows/formatter.yml\" target=\"_blank\"><img src=\"https://github.com/ieasybooks/tafrigh/actions/workflows/formatter.yml/badge.svg\" /></a>\n  <a href=\"https://sonarcloud.io/summary/new_code?id=ieasybooks_tafrigh\" target=\"_blank\"><img src=\"https://sonarcloud.io/api/project_badges/measure?project=ieasybooks_tafrigh&metric=code_smells\" /></a>\n  <a href=\"https://tafrigh.ieasybooks.com\" target=\"_blank\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" /></a>\n</div>\n\n<h1 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a</h1>\n\n<p dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0645\u0648\u0627\u062f \u0627\u0644\u0645\u0631\u0626\u064a\u0629 \u0623\u0648 \u0627\u0644\u0645\u0633\u0645\u0648\u0639\u0629 \u0625\u0644\u0649 \u0646\u0635\u0648\u0635.</p>\n\n<p dir=\"rtl\">\u064a\u0645\u0643\u0646\u0643 \u0627\u0644\u0627\u0637\u0644\u0627\u0639 \u0639\u0644\u0649 \u0623\u0645\u062b\u0644\u0629 \u062a\u0645 \u062a\u0641\u0631\u064a\u063a\u0647\u0627 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062a\u0641\u0631\u064a\u063a \u0645\u0646 <a href=\"https://drive.google.com/drive/folders/1mwdJ9t4tiu8jFGosvNsq8SL54HoQMB8G?usp=sharing\">\u0647\u0646\u0627</a>.</p>\n\n<h2 dir=\"rtl\">\u0645\u0645\u064a\u0632\u0627\u062a \u062a\u0641\u0631\u064a\u063a</h2>\n\n<ul dir=\"rtl\">\n  <li>\u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0645\u0648\u0627\u062f \u0627\u0644\u0645\u0631\u0626\u064a \u0648\u0627\u0644\u0645\u0633\u0645\u0648\u0639 \u0625\u0644\u0649 \u0646\u0635\u0648\u0635 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0623\u062d\u062f\u062b \u062a\u0642\u0646\u064a\u0627\u062a \u0627\u0644\u0630\u0643\u0627\u0621 \u0627\u0644\u0627\u0635\u0637\u0646\u0627\u0639\u064a \u0627\u0644\u0645\u0642\u062f\u0645\u0629 \u0645\u0646 \u0634\u0631\u0643\u0629 OpenAI</li>\n  <li>\u0625\u0645\u0643\u0627\u0646\u064a\u0629 \u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0645\u0648\u0627\u062f \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062a\u0642\u0646\u064a\u0627\u062a wit.ai \u0627\u0644\u0645\u0642\u062f\u0645\u0629 \u0645\u0646 \u0634\u0631\u0643\u0629 Facebook</li>\n  <li>\u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u0645\u0631\u0626\u064a \u0628\u0634\u0643\u0644 \u0645\u0628\u0627\u0634\u0631 \u0645\u0646 \u0645\u0646\u0635\u0629 YouTube \u0633\u0648\u0627\u0621\u064b \u0643\u0627\u0646 \u0627\u0644\u0645\u0633\u062a\u0647\u062f\u0641 \u0645\u0627\u062f\u0629 \u0648\u0627\u062d\u062f\u0629 \u0623\u0648 \u0642\u0627\u0626\u0645\u0629 \u062a\u0634\u063a\u064a\u0644 \u0643\u0627\u0645\u0644\u0629</li>\n  <li>\u062a\u0648\u0641\u064a\u0631 \u0635\u064a\u064e\u063a \u0645\u062e\u0631\u062c\u0627\u062a \u0645\u062e\u062a\u0644\u0641\u0629 \u0643\u0640 <code>txt</code> \u0648 <code>srt</code> \u0648 <code>vtt</code> \u0648 <code>csv</code> \u0648 <code>tsv</code> \u0648 <code>json</code></li>\n</ul>\n\n<h2 dir=\"rtl\">\u0645\u062a\u0637\u0644\u0628\u0627\u062a \u0627\u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645</h2>\n\n<ul dir=\"rtl\">\n  <li>\u064a\u064f\u0641\u0636\u0651\u0644 \u0648\u062c\u0648\u062f \u0645\u0639\u0627\u0644\u062c \u0631\u0633\u0648\u0645\u064a\u0627\u062a \u0642\u0648\u064a \u0641\u064a \u062d\u0627\u0633\u0628\u0643 \u0641\u064a \u062d\u0627\u0644 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0646\u0645\u0627\u0630\u062c Whisper</li>\n  <li>\u062a\u062b\u0628\u064a\u062a \u0644\u063a\u0629 Python \u0628\u0625\u0635\u062f\u0627\u0631 3.9 \u0623\u0648 \u0623\u0639\u0644\u0649 \u0639\u0644\u0649 \u062d\u0627\u0633\u0628\u0643</li>\n  <li>\u062a\u062b\u0628\u064a\u062a \u0628\u0631\u0645\u062c\u064a\u0629 <a href=\"https://ffmpeg.org\">FFmpeg</a> \u0639\u0644\u0649 \u062d\u0627\u0633\u0628\u0643</li>\n  <li>\u062a\u062b\u0628\u064a\u062a \u0628\u0631\u0645\u062c\u064a\u0629 <a href=\"https://github.com/yt-dlp/yt-dlp\">yt-dlp</a> \u0639\u0644\u0649 \u062d\u0627\u0633\u0628\u0643</li>\n</ul>\n\n<h2 dir=\"rtl\">\u062a\u062b\u0628\u064a\u062a \u062a\u0641\u0631\u064a\u063a</h2>\n\n<h3 dir=\"rtl\">\u0645\u0646 \u062e\u0644\u0627\u0644 <code>pip</code></h3>\n\n<p dir=\"rtl\">\u064a\u0645\u0643\u0646\u0643 \u062a\u062b\u0628\u064a\u062a \u062a\u0641\u0631\u064a\u063a \u0645\u0646 \u062e\u0644\u0627\u0644 <code>pip</code> \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0623\u0645\u0631: <code dir=\"ltr\">pip install tafrigh[wit,whisper]</code></p>\n\n<h3 dir=\"rtl\">\u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0645\u0635\u062f\u0631\u064a\u0629</h3>\n\n<ul dir=\"rtl\">\n  <li>\u0642\u0645 \u0628\u062a\u0646\u0632\u064a\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0633\u062a\u0648\u062f\u0639 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0636\u063a\u0637 \u0639\u0644\u0649 Code \u062b\u0645 Download ZIP \u0623\u0648 \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0646\u0641\u064a\u0630 \u0627\u0644\u0623\u0645\u0631 \u0627\u0644\u062a\u0627\u0644\u064a: <code>git clone git@github.com:ieasybooks/tafrigh.git</code></li>\n  <li>\u0642\u0645 \u0628\u0641\u0643 \u0636\u063a\u0637 \u0627\u0644\u0645\u0644\u0641 \u0625\u0630\u0627 \u0642\u0645\u062a \u0628\u062a\u0646\u0632\u064a\u0644\u0647 \u0628\u0635\u064a\u063a\u0629 ZIP \u0648\u062a\u0648\u062c\u0651\u0647 \u0625\u0644\u0649 \u0645\u062c\u0644\u062f \u0627\u0644\u0645\u0634\u0631\u0648\u0639</li>\n  <li>\u0642\u0645 \u0628\u062a\u0646\u0641\u064a\u0630 \u0627\u0644\u0623\u0645\u0631 \u0627\u0644\u062a\u0627\u0644\u064a \u0644\u062a\u062b\u0628\u064a\u062a \u062a\u0641\u0631\u064a\u063a: <code dir=\"ltr\">pip install .[wit,whisper]</code></li>\n</ul>\n\n<h3 dir=\"rtl\">\u0645\u0646 \u062e\u0644\u0627\u0644 \u0645\u0633\u062a\u0648\u062f\u0639 GitHub</h3>\n\n<p dir=\"rtl\">\u064a\u0645\u0643\u0646 \u062a\u062b\u0628\u064a\u062a \u062a\u0641\u0631\u064a\u063a \u0645\u0646 \u062e\u0644\u0627\u0644 \u0645\u0633\u062a\u0648\u062f\u0639 GitHub \u0645\u0628\u0627\u0634\u0631\u0629 \u0639\u0646 \u0637\u0631\u064a\u0642 \u062a\u0646\u0641\u064a\u0630 \u0627\u0644\u0623\u0645\u0631: <code dir=\"ltr\">pip install \"tafrigh[wit,whisper] @ git+https://github.com/ieasybooks/tafrigh\"</code>.</p>\n\n<p dir=\"rtl\">\u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0627\u0639\u062a\u0645\u0627\u062f\u064a\u0627\u062a \u0627\u0644\u062a\u064a \u062a\u0631\u064a\u062f \u062a\u062b\u0628\u064a\u062a\u0647\u0627 \u062d\u0633\u0628 \u0646\u0648\u0639 \u0627\u0644\u062a\u0642\u0646\u064a\u0629 \u0627\u0644\u062a\u064a \u062a\u0631\u064a\u062f \u0627\u0633\u062a\u062e\u062f\u0627\u0645\u0647\u0627 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0643\u062a\u0627\u0628\u0629 <code>wit</code> \u0623\u0648 <code>whisper</code> \u0628\u064a\u0646 \u0642\u0648\u0633\u064a\u0646 \u0645\u0631\u0628\u0639\u064a\u0646 \u0643\u0645\u0627 \u0647\u0648 \u0645\u0648\u0636\u0651\u062d \u0641\u064a \u0627\u0644\u0623\u0648\u0627\u0645\u0631 \u0627\u0644\u0633\u0627\u0628\u0642\u0629.</p>\n\n<h2 dir=\"rtl\">\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062a\u0641\u0631\u064a\u063a</h2>\n\n<h3 dir=\"rtl\">\u0627\u0644\u062e\u064a\u0627\u0631\u0627\u062a \u0627\u0644\u0645\u062a\u0648\u0641\u0631\u0629</h3>\n\n<ul dir=\"rtl\">\n  <li>\n    \u0627\u0644\u0645\u062f\u062e\u0644\u0627\u062a\n    <ul dir=\"rtl\">\n      <li>\u0627\u0644\u0631\u0648\u0627\u0628\u0637 \u0623\u0648 \u0645\u0633\u0627\u0631\u0627\u062a \u0627\u0644\u0645\u0644\u0641\u0627\u062a: \u064a\u062c\u0628 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0631\u0648\u0627\u0628\u0637 \u0623\u0648 \u0645\u0633\u0627\u0631\u0627\u062a \u0627\u0644\u0645\u0644\u0641\u0627\u062a \u0644\u0644\u0645\u0648\u0627\u062f \u0627\u0644\u0645\u064f\u0631\u0627\u062f \u062a\u0641\u0631\u064a\u063a\u0647\u0627 \u0628\u0639\u062f \u0627\u0633\u0645 \u0623\u062f\u0627\u0629 \u062a\u0641\u0631\u064a\u063a \u0628\u0634\u0643\u0644 \u0645\u0628\u0627\u0634\u0631. \u0639\u0644\u0649 \u0633\u0628\u064a\u0644 \u0627\u0644\u0645\u062b\u0627\u0644: <code dir=\"ltr\">tafrigh \"https://yout...\" \"https://yout...\" \"C:\\Users\\ieasybooks\\leactue.wav\"</code></li>\n      <li>\u062a\u062e\u0637\u064a \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062a\u0641\u0631\u064a\u063a \u0641\u064a \u062d\u0627\u0644 \u0648\u062c\u0648\u062f \u0627\u0644\u0645\u062e\u0631\u062c\u0627\u062a \u0645\u0633\u0628\u0642\u064b\u0627: \u064a\u0645\u0643\u0646 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--skip_if_output_exist</code> \u0644\u062a\u062e\u0637\u064a \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062a\u0641\u0631\u064a\u063a \u0625\u0630\u0627 \u0643\u0627\u0646\u062a \u0627\u0644\u0645\u062e\u0631\u062c\u0627\u062a \u0627\u0644\u0645\u0637\u0644\u0648\u0628\u0629 \u0645\u0648\u062c\u0648\u062f\u0629 \u0628\u0627\u0644\u0641\u0639\u0644 \u0641\u064a \u0645\u062c\u0644\u062f \u0627\u0644\u0625\u062e\u0631\u0627\u062c \u0627\u0644\u0645\u062d\u062f\u062f</li>\n      <li>\u0627\u0644\u0645\u0648\u0627\u062f \u0627\u0644\u0645\u064f\u0631\u0627\u062f \u062a\u0641\u0631\u064a\u0641\u0647\u0627 \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644: \u064a\u0645\u0643\u0646 \u062a\u062d\u062f\u064a\u062f \u0646\u0637\u0627\u0642 \u0645\u0639\u064a\u0646 \u0645\u0646 \u0627\u0644\u0645\u0648\u0627\u062f \u0644\u064a\u062a\u0645 \u062a\u0641\u0631\u064a\u063a\u0647 \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--playlist_items</code> \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0642\u064a\u0645\u0629 \u0639\u0644\u0649 \u0635\u064a\u063a\u0629 <code dir=\"ltr\">\"[START]:[STOP][:STEP]\"</code>. \u0639\u0644\u0649 \u0633\u0628\u064a\u0644 \u0627\u0644\u0645\u062b\u0627\u0644\u060c \u0639\u0646\u062f \u062a\u0645\u0631\u064a\u0631 <code dir=\"ltr\">2:5</code> \u0633\u064a\u062a\u0645 \u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u0645\u0648\u0627\u062f \u0645\u0646 <code>2</code> \u0625\u0644\u0649 <code>5</code> \u0645\u0646 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062a\u0634\u063a\u064a\u0644. \u0647\u0630\u0627 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 \u064a\u064f\u0624\u062b\u0651\u0631 \u0639\u0644\u0649 \u0643\u0644 \u0642\u0648\u0627\u0626\u0645 \u0627\u0644\u062a\u0634\u063a\u064a\u0644 \u0627\u0644\u062a\u064a \u064a\u062a\u0645 \u062a\u0645\u0631\u064a\u0631\u0647\u0627 \u0643\u0645\u062f\u062e\u0644\u0627\u062a \u0644\u062a\u0641\u0631\u064a\u063a</li>\n    </ul>\n  </li>\n\n  <li>\n    \u062e\u064a\u0627\u0631\u0627\u062a \u062a\u0642\u0646\u064a\u0629 Whisper\n    <ul dir=\"rtl\">\n      <li>\n        \u0627\u0644\u0646\u0645\u0648\u0630\u062c: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0646\u0645\u0648\u0630\u062c \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--model_name_or_path</code>. \u0627\u0644\u0646\u0645\u0627\u0630\u062c \u0627\u0644\u0645\u062a\u0648\u0641\u0631\u0629:\n        <ul dir=\"rtl\">\n          <li><code dir=\"ltr\">tiny.en</code> (\u0644\u063a\u0629 \u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629 \u0641\u0642\u0637)</li>\n          <li><code dir=\"ltr\">tiny</code> (\u0627\u0644\u0623\u0642\u0644 \u062f\u0642\u0629)</li>\n          <li><code dir=\"ltr\">base.en</code> (\u0644\u063a\u0629 \u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629 \u0641\u0642\u0637)</li>\n          <li><code dir=\"ltr\">base</code></li>\n          <li><code dir=\"ltr\">small.en</code> (\u0644\u063a\u0629 \u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629 \u0641\u0642\u0637)</li>\n          <li><code dir=\"ltr\">small</code> <strong>(\u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 \u0627\u0644\u0625\u0641\u062a\u0631\u0627\u0636\u064a)</strong></li>\n          <li><code dir=\"ltr\">medium.en</code> (\u0644\u063a\u0629 \u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629 \u0641\u0642\u0637)</li>\n          <li><code dir=\"ltr\">medium</code></li>\n          <li><code dir=\"ltr\">large-v1</code></li>\n          <li><code dir=\"ltr\">large-v2</code></li>\n          <li><code dir=\"ltr\">large</code> (\u0627\u0644\u0623\u0639\u0644\u0649 \u062f\u0642\u0629)</li>\n          <li>\u0627\u0633\u0645 \u0646\u0645\u0648\u0630\u062c Whisper \u0645\u0648\u062c\u0648\u062f \u0639\u0644\u0649 HuggingFace Hub</li>\n          <li>\u0645\u0633\u0627\u0631 \u0646\u0645\u0648\u0630\u062c Whisper \u062a\u0645 \u062a\u062d\u0645\u064a\u0644\u0629 \u0645\u0633\u0628\u0642\u064b\u0627</li>\n          <li>\u0645\u0633\u0627\u0631 \u0646\u0645\u0648\u0630\u062c Whisper \u062a\u0645 \u062a\u062d\u0648\u064a\u0644\u0647 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0623\u062f\u0627\u0629 <a href=\"https://opennmt.net/CTranslate2/guides/transformers.html\"><code>ct2-transformers-converter</code></a> \u0644\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0645\u0643\u062a\u0628\u0629 \u0627\u0644\u0633\u0631\u064a\u0639\u0629 <a href=\"https://github.com/guillaumekln/faster-whisper\"><code>faster-whisper</code></a></li>\n        </ul>\n      </li>\n      <li>\n        \u0627\u0644\u0645\u0647\u0645\u0629: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0645\u0647\u0645\u0629 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--task</code>. \u0627\u0644\u0645\u0647\u0645\u0627\u062a \u0627\u0644\u0645\u062a\u0648\u0641\u0631\u0629:\n        <ul dir=\"rtl\">\n          <li><code dir=\"ltr\">transcribe</code>: \u062a\u062d\u0648\u064a\u0644 \u0627\u0644\u0635\u0648\u062a \u0625\u0644\u0649 \u0646\u0635 <strong>(\u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 \u0627\u0644\u0625\u0641\u062a\u0631\u0627\u0636\u064a)</strong></li>\n          <li><code dir=\"ltr\">translation</code>: \u062a\u0631\u062c\u0645\u0629 \u0627\u0644\u0635\u0648\u062a \u0625\u0644\u0649 \u0646\u0635 \u0628\u0627\u0644\u0644\u063a\u0629 \u0627\u0644\u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629</li>\n        </ul>\n      </li>\n      <li>\u0627\u0644\u0644\u063a\u0629: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0644\u063a\u0629 \u0627\u0644\u0635\u0648\u062a \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--language</code>. \u0639\u0644\u0649 \u0633\u0628\u064a\u0644 \u0627\u0644\u0645\u062b\u0627\u0644\u060c \u0644\u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0644\u063a\u0629 \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0642\u0645 \u0628\u062a\u0645\u0631\u064a\u0631 <code dir=\"ltr\">ar</code>. \u0625\u0630\u0627 \u0644\u0645 \u064a\u062a\u0645 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0644\u063a\u0629\u060c \u0633\u064a\u062a\u0645 \u0627\u0644\u062a\u0639\u0631\u0641 \u0639\u0644\u064a\u0647\u0627 \u062a\u0644\u0642\u0627\u0626\u064a\u0627</li>\n      <li>\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0646\u0633\u062e\u0629 \u0623\u0633\u0631\u0639 \u0645\u0646 \u0646\u0645\u0627\u0630\u062c Whisper: \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--use_faster_whisper</code> \u0633\u064a\u062a\u0645 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0646\u0633\u062e\u0629 \u0627\u0644\u0623\u0633\u0631\u0639 \u0645\u0646 \u0646\u0645\u0627\u0630\u062c Whisper</li>\n      <li>\u062d\u062c\u0645 \u0646\u0637\u0627\u0642 \u0627\u0644\u0628\u062d\u062b: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u0633\u064a\u0646 \u0627\u0644\u0646\u062a\u0627\u0626\u062c \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--beam_size</code> \u0648\u0627\u0644\u0630\u064a \u064a\u0633\u0645\u062d \u0644\u0643 \u0628\u0625\u062c\u0628\u0627\u0631 \u0627\u0644\u0646\u0645\u0648\u0630\u062c \u0639\u0644\u0649 \u0627\u0644\u0628\u062d\u062b \u0641\u064a \u0646\u0637\u0627\u0642 \u0623\u0648\u0633\u0639 \u0645\u0646 \u0627\u0644\u0643\u0644\u0645\u0627\u062a \u0623\u062b\u0646\u0627\u0621 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0646\u0635. \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0625\u0641\u062a\u0631\u0627\u0636\u064a\u0629 \u0647\u064a <code>5</code></li>\n      <li>\n        \u0637\u0631\u064a\u0642\u0629 \u0636\u063a\u0637 \u0627\u0644\u0646\u0645\u0648\u0630\u062c: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0627\u0644\u0637\u0631\u064a\u0642\u0629 \u0627\u0644\u062a\u064a \u062a\u0645 \u0628\u0647\u0627 \u0636\u063a\u0637 \u0627\u0644\u0646\u0645\u0648\u0630\u062c \u0623\u062b\u0646\u0627\u0621 \u062a\u062d\u0648\u064a\u0644\u0647 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0623\u062f\u0627\u0629 <a href=\"https://opennmt.net/CTranslate2/guides/transformers.html\"><code>ct2-transformers-converter</code></a> \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--ct2_compute_type</code>. \u0627\u0644\u0637\u0631\u0642 \u0627\u0644\u0645\u062a\u0648\u0641\u0631\u0629:\n        <ul dir=\"rtl\">\n          <li><code dir=\"ltr\">default</code> <strong>(\u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 \u0627\u0644\u0625\u0641\u062a\u0631\u0627\u0636\u064a)</strong></li>\n          <li><code dir=\"ltr\">int8</code></li>\n          <li><code dir=\"ltr\">int8_float16</code></li>\n          <li><code dir=\"ltr\">int16</code></li>\n          <li><code dir=\"ltr\">float16</code></li>\n        </ul>\n      </li>\n    </ul>\n  </li>\n\n  <li>\n    \u062e\u064a\u0627\u0631\u0627\u062a \u062a\u0642\u0646\u064a\u0629 Wit\n    <ul dir=\"rtl\">\n      <li>\u0645\u0641\u0627\u062a\u064a\u062d <a href=\"wit.ai\">wit.ai</a>: \u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062a\u0642\u0646\u064a\u0627\u062a <a href=\"wit.ai\">wit.ai</a> \u0644\u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0645\u0648\u0627\u062f \u0625\u0644\u0649 \u0646\u0635\u0648\u0635 \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0645\u0641\u062a\u0627\u062d \u0623\u0648 \u0627\u0644\u0645\u0641\u0627\u062a\u064a\u062d \u0627\u0644\u062e\u0627\u0635\u0629 \u0628\u0643 \u0644\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--wit_client_access_tokens</code>. \u0625\u0630\u0627 \u062a\u0645 \u062a\u0645\u0631\u064a\u0631 \u0647\u0630\u0627 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631\u060c \u0633\u064a\u062a\u0645 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 <a href=\"wit.ai\">wit.ai</a> \u0644\u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0645\u0648\u0627\u062f \u0625\u0644\u0649 \u0646\u0635\u0648\u0635. \u063a\u064a\u0631 \u0630\u0644\u0643\u060c \u0633\u064a\u062a\u0645 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0646\u0645\u0627\u0630\u062c Whisper</li>\n      <li>\u062a\u062d\u062f\u064a\u062f \u0623\u0642\u0635\u0649 \u0645\u062f\u0629 \u0644\u0644\u062a\u0642\u0637\u064a\u0639: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0623\u0642\u0635\u0649 \u0645\u062f\u0629 \u0644\u0644\u062a\u0642\u0637\u064a\u0639 \u0648\u0627\u0644\u062a\u064a \u0633\u062a\u0624\u062b\u0631 \u0639\u0644\u0649 \u0637\u0648\u0644 \u0627\u0644\u062c\u0645\u0644 \u0641\u064a \u0645\u0644\u0641\u0627\u062a SRT \u0648 VTT \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--max_cutting_duration</code>. \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629 \u0647\u064a <code>15</code></li>\n    </ul>\n  </li>\n\n  <li>\n    \u0627\u0644\u0645\u062e\u0631\u062c\u0627\u062a\n    <ul dir=\"rtl\">\n      <li>\u0636\u063a\u0637 \u0627\u0644\u0623\u062c\u0632\u0627\u0621: \u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--min_words_per_segment</code> \u0644\u0644\u062a\u062d\u0643\u0645 \u0641\u064a \u0623\u0642\u0644 \u0639\u062f\u062f \u0645\u0646 \u0627\u0644\u0643\u0644\u0645\u0627\u062a \u0627\u0644\u062a\u064a \u064a\u0645\u0643\u0646 \u0623\u0646 \u062a\u0643\u0648\u0646 \u062f\u0627\u062e\u0644 \u062c\u0632\u0621 \u0648\u0627\u062d\u062f \u0645\u0646 \u0623\u062c\u0632\u0627\u0621 \u0627\u0644\u062a\u0641\u0631\u064a\u063a. \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0625\u0641\u062a\u0631\u0627\u0636\u064a\u0629 \u0647\u064a <code>1</code>\u060c \u064a\u0645\u0643\u0646\u0643 \u062a\u0645\u0631\u064a\u0631 <code>0</code> \u0644\u062a\u0639\u0637\u064a\u0644 \u0647\u0630\u0647 \u0627\u0644\u062e\u0627\u0635\u064a\u0629</li>\n      <li>\u064a\u0645\u0643\u0646\u0643 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--save_files_before_compact</code> \u0644\u062d\u0641\u0638 \u0627\u0644\u0645\u0644\u0641\u0627\u062a \u0627\u0644\u0623\u0635\u0644\u064a\u0629 \u0642\u0628\u0644 \u0623\u0646 \u064a\u062a\u0645 \u062f\u0645\u062c \u0623\u062c\u0632\u0627\u0626\u0647\u0627 \u0628\u0646\u0627\u0621 \u0639\u0644\u0649 \u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--min_words_per_segment</code></li>\n      <li>\u064a\u0645\u0643\u0646\u0643 \u062d\u0641\u0638 \u0645\u062e\u0631\u062c\u0627\u062a \u0645\u0643\u062a\u0628\u0629 <code>yt-dlp</code> \u0628\u0635\u064a\u063a\u0629 <code>json</code> \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--save_yt_dlp_responses</code></li>\n      <li>\u0625\u062e\u0631\u0627\u062c \u0639\u064a\u0646\u0629 \u0645\u0646 \u0627\u0644\u0623\u062c\u0632\u0627\u0621 \u0628\u0639\u062f \u0627\u0644\u062f\u0645\u062c: \u064a\u0645\u0643\u0646\u0643 \u062a\u0645\u0631\u064a\u0631 \u0642\u064a\u0645\u0629 \u0644\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--output_sample</code> \u0644\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u0649 \u0639\u064a\u0646\u0629 \u0639\u0634\u0648\u0627\u0626\u064a\u0629 \u0645\u0646 \u062c\u0645\u064a\u0639 \u0627\u0644\u0623\u062c\u0632\u0627\u0621 \u0627\u0644\u062a\u064a \u062a\u0645 \u062a\u0641\u0631\u064a\u063a\u0647\u0627 \u0645\u0646 \u0643\u0644 \u0627\u0644\u0645\u0648\u0627\u062f \u0628\u0639\u062f \u062f\u0645\u062c\u0647\u0627 \u0628\u0646\u0627\u0621 \u0639\u0644\u0649 \u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--min_words_per_segment</code>. \u0627\u0644\u0642\u064a\u0645\u0629 \u0627\u0644\u0627\u0641\u062a\u0631\u0627\u0636\u064a\u0629 \u0647\u064a <code>0</code>\u060c \u0623\u064a \u0623\u0646\u0647 \u0644\u0646 \u064a\u062a\u0645 \u0625\u062e\u0631\u0627\u062c \u0623\u064a \u0639\u064a\u0646\u0627\u062a</li>\n      <li>\n        \u0635\u064a\u063a\u0629 \u0627\u0644\u0645\u062e\u0631\u062c\u0627\u062a: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0635\u064a\u063a\u0629 \u0627\u0644\u0645\u062e\u0631\u062c\u0627\u062a \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--output_formats</code>. \u0627\u0644\u0635\u064a\u063a \u0627\u0644\u0645\u062a\u0648\u0641\u0631\u0629:\n        <ul dir=\"rtl\">\n          <li><code dir=\"ltr\">txt</code></li>\n          <li><code dir=\"ltr\">srt</code></li>\n          <li><code dir=\"ltr\">vtt</code></li>\n          <li><code dir=\"ltr\">csv</code></li>\n          <li><code dir=\"ltr\">tsv</code></li>\n          <li><code dir=\"ltr\">json</code></li>\n          <li><code dir=\"ltr\">all</code> <strong>(\u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 \u0627\u0644\u0625\u0641\u062a\u0631\u0627\u0636\u064a)</strong></li>\n          <li><code dir=\"ltr\">none</code> (\u0644\u0646 \u064a\u062a\u0645 \u0625\u0646\u0634\u0627\u0621 \u0645\u0644\u0641 \u0641\u064a \u062d\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0647\u0630\u0647 \u0627\u0644\u0635\u064a\u063a\u0629)</li>\n        </ul>\n      </li>\n      <li>\u0645\u062c\u0644\u062f \u0627\u0644\u0645\u062e\u0631\u062c\u0627\u062a: \u064a\u0645\u0643\u0646\u0643 \u062a\u062d\u062f\u064a\u062f \u0645\u062c\u0644\u062f \u0627\u0644\u0627\u062e\u0631\u0627\u062c \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--output_dir</code>. \u0628\u0634\u0643\u0644 \u062a\u0644\u0642\u0627\u0626\u064a \u0633\u064a\u0643\u0648\u0646 \u0627\u0644\u0645\u062c\u0644\u062f \u0627\u0644\u062d\u0627\u0644\u064a \u0647\u0648 \u0645\u062c\u0644\u062f \u0627\u0644\u0627\u062e\u0631\u0627\u062c \u0625\u0630\u0627 \u0644\u0645 \u064a\u062a\u0645 \u062a\u062d\u062f\u064a\u062f\u0647</li>\n    </ul>\n  </li>\n</ul>\n\n```\n\u279c tafrigh --help\nusage: tafrigh [-h] [--version] [--skip_if_output_exist | --no-skip_if_output_exist] [--playlist_items PLAYLIST_ITEMS] [--verbose | --no-verbose] [-m MODEL_NAME_OR_PATH] [-t {transcribe,translate}]\n               [-l {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh}]\n               [--use_faster_whisper | --no-use_faster_whisper] [--beam_size BEAM_SIZE] [--ct2_compute_type {default,int8,int8_float16,int16,float16}] [-w WIT_CLIENT_ACCESS_TOKENS [WIT_CLIENT_ACCESS_TOKENS ...]]\n               [--max_cutting_duration [1-17]] [--min_words_per_segment MIN_WORDS_PER_SEGMENT] [--save_files_before_compact | --no-save_files_before_compact] [--save_yt_dlp_responses | --no-save_yt_dlp_responses]\n               [--output_sample OUTPUT_SAMPLE] [-f {all,txt,srt,vtt,csv,tsv,json,none} [{all,txt,srt,vtt,csv,tsv,json,none} ...]] [-o OUTPUT_DIR]\n               urls_or_paths [urls_or_paths ...]\n\noptions:\n  -h, --help            show this help message and exit\n  --version             show program's version number and exit\n\nInput:\n  urls_or_paths         Video/Playlist URLs or local folder/file(s) to transcribe.\n  --skip_if_output_exist, --no-skip_if_output_exist\n                        Whether to skip generating the output if the output file already exists. (default: False)\n  --playlist_items PLAYLIST_ITEMS\n                        Comma separated playlist_index of the items to download. You can specify a range using \"[START]:[STOP][:STEP]\".\n  --verbose, --no-verbose\n                        Whether to print out the progress and debug messages. (default: False)\n\nWhisper:\n  -m MODEL_NAME_OR_PATH, --model_name_or_path MODEL_NAME_OR_PATH\n                        Name or path of the Whisper model to use.\n  -t {transcribe,translate}, --task {transcribe,translate}\n                        Whether to perform X->X speech recognition ('transcribe') or X->English translation ('translate').\n  -l {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh}, --language {af,am,ar,as,az,ba,be,bg,bn,bo,br,bs,ca,cs,cy,da,de,el,en,es,et,eu,fa,fi,fo,fr,gl,gu,ha,haw,he,hi,hr,ht,hu,hy,id,is,it,ja,jw,ka,kk,km,kn,ko,la,lb,ln,lo,lt,lv,mg,mi,mk,ml,mn,mr,ms,mt,my,ne,nl,nn,no,oc,pa,pl,ps,pt,ro,ru,sa,sd,si,sk,sl,sn,so,sq,sr,su,sv,sw,ta,te,tg,th,tk,tl,tr,tt,uk,ur,uz,vi,yi,yo,zh}\n                        Language spoken in the audio, skip to perform language detection.\n  --use_faster_whisper, --no-use_faster_whisper\n                        Whether to use Faster Whisper implementation. (default: False)\n  --beam_size BEAM_SIZE\n                        Number of beams in beam search, only applicable when temperature is zero.\n  --ct2_compute_type {default,int8,int8_float16,int16,float16}\n                        Quantization type applied while converting the model to CTranslate2 format.\n\nWit:\n  -w WIT_CLIENT_ACCESS_TOKENS [WIT_CLIENT_ACCESS_TOKENS ...], --wit_client_access_tokens WIT_CLIENT_ACCESS_TOKENS [WIT_CLIENT_ACCESS_TOKENS ...]\n                        List of wit.ai client access tokens. If provided, wit.ai APIs will be used to do the transcription, otherwise whisper will be used.\n  --max_cutting_duration [1-17]\n                        The maximum allowed cutting duration. It should be between 1 and 17.\n\nOutput:\n  --min_words_per_segment MIN_WORDS_PER_SEGMENT\n                        The minimum number of words should appear in each transcript segment. Any segment have words count less than this threshold will be merged with the next one. Pass 0 to disable this behavior.\n  --save_files_before_compact, --no-save_files_before_compact\n                        Saves the output files before applying the compact logic that is based on --min_words_per_segment. (default: False)\n  --save_yt_dlp_responses, --no-save_yt_dlp_responses\n                        Whether to save the yt-dlp library JSON responses or not. (default: False)\n  --output_sample OUTPUT_SAMPLE\n                        Samples random compacted segments from the output and generates a CSV file contains the sampled data. Pass 0 to disable this behavior.\n  -f {all,txt,srt,vtt,csv,tsv,json,none} [{all,txt,srt,vtt,csv,tsv,json,none} ...], --output_formats {all,txt,srt,vtt,csv,tsv,json,none} [{all,txt,srt,vtt,csv,tsv,json,none} ...]\n                        Format of the output file; if not specified, all available formats will be produced.\n  -o OUTPUT_DIR, --output_dir OUTPUT_DIR\n                        Directory to save the outputs.\n```\n\n<h3 dir=\"rtl\">\u0627\u0644\u062a\u0641\u0631\u064a\u063a \u0645\u0646 \u062e\u0644\u0627\u0644 \u0633\u0637\u0631 \u0627\u0644\u0623\u0648\u0627\u0645\u0631</h3>\n\n<h4 dir=\"rtl\">\u0627\u0644\u062a\u0641\u0631\u064a\u063a \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0646\u0645\u0627\u0630\u062c Whisper</h4>\n\n<h5 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0645\u0642\u0637\u0639 \u0648\u0627\u062d\u062f</h5>\n\n```\ntafrigh \"https://youtu.be/dDzxYcEJbgo\" \\\n  --model_name_or_path small \\\n  --task transcribe \\\n  --language ar \\\n  --output_dir . \\\n  --output_formats txt srt\n```\n\n<h5 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0642\u0627\u0626\u0645\u0629 \u062a\u0634\u063a\u064a\u0644 \u0643\u0627\u0645\u0644\u0629</h5>\n\n```\ntafrigh \"https://youtube.com/playlist?list=PLyS-PHSxRDxsLnVsPrIwnsHMO5KgLz7T5\" \\\n  --model_name_or_path small \\\n  --task transcribe \\\n  --language ar \\\n  --output_dir . \\\n  --output_formats txt srt\n```\n\n<h5 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0623\u0643\u062b\u0631 \u0645\u0646 \u0645\u0642\u0637\u0639</h5>\n\n```\ntafrigh \"https://youtu.be/4h5P7jXvW98\" \"https://youtu.be/jpfndVSROpw\" \\\n  --model_name_or_path small \\\n  --task transcribe \\\n  --language ar \\\n  --output_dir . \\\n  --output_formats txt srt\n```\n\n<h5 dir=\"rtl\">\u062a\u0633\u0631\u064a\u0639 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062a\u0641\u0631\u064a\u063a</h5>\n\n<p dir=\"rtl\">\u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0645\u0643\u062a\u0628\u0629 <code><a href=\"https://github.com/guillaumekln/faster-whisper\">faster_whisper</a></code> \u0627\u0644\u062a\u064a \u062a\u0648\u0641\u0651\u0631 \u0633\u0631\u0639\u0629 \u0623\u0643\u0628\u0631 \u0641\u064a \u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0645\u0648\u0627\u062f \u0645\u0646 \u062e\u0644\u0627\u0644 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0627\u062e\u062a\u064a\u0627\u0631 <code dir=\"ltr\">--use_faster_whisper</code> \u0643\u0627\u0644\u062a\u0627\u0644\u064a:</p>\n\n```\ntafrigh \"https://youtu.be/3K5Jh_-UYeA\" \\\n  --model_name_or_path large \\\n  --task transcribe \\\n  --language ar \\\n  --use_faster_whisper \\\n  --output_dir . \\\n  --output_formats txt srt\n```\n\n<h4 dir=\"rtl\">\u0627\u0644\u062a\u0641\u0631\u064a\u063a \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062a\u0642\u0646\u064a\u0629 wit.ai</h4>\n\n<h5 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0645\u0642\u0637\u0639 \u0648\u0627\u062d\u062f</h5>\n\n```\ntafrigh \"https://youtu.be/dDzxYcEJbgo\" \\\n  --wit_client_access_tokens XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --output_dir . \\\n  --output_formats txt srt \\\n  --min_words_per_segment 10 \\\n  --max_cutting_duration 10\n```\n\n<h5 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0642\u0627\u0626\u0645\u0629 \u062a\u0634\u063a\u064a\u0644 \u0643\u0627\u0645\u0644\u0629</h5>\n\n```\ntafrigh \"https://youtube.com/playlist?list=PLyS-PHSxRDxsLnVsPrIwnsHMO5KgLz7T5\" \\\n  --wit_client_access_tokens XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --output_dir . \\\n  --output_formats txt srt \\\n  --min_words_per_segment 10 \\\n  --max_cutting_duration 10\n```\n\n<h5 dir=\"rtl\">\u062a\u0641\u0631\u064a\u063a \u0623\u0643\u062b\u0631 \u0645\u0646 \u0645\u0642\u0637\u0639</h5>\n\n```\ntafrigh \"https://youtu.be/4h5P7jXvW98\" \"https://youtu.be/jpfndVSROpw\" \\\n  --wit_client_access_tokens XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \\\n  --output_dir . \\\n  --output_formats txt srt \\\n  --min_words_per_segment 10 \\\n  --max_cutting_duration 10\n```\n\n<h3 dir=\"rtl\">\u0627\u0644\u062a\u0641\u0631\u064a\u063a \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629</h3>\n\n<p dir=\"rtl\">\u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u062a\u0641\u0631\u064a\u063a \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0644\u0634\u064a\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u0645\u062c\u064a\u0629 \u0643\u0627\u0644\u062a\u0627\u0644\u064a:</p>\n\n```python\nfrom tafrigh import farrigh, Config\n\nif __name__ == '__main__':\n  config = Config(\n    urls_or_paths=['https://youtu.be/qFsUwp5iomU'],\n    skip_if_output_exist=False,\n    playlist_items='',\n    verbose=False,\n    model_name_or_path='tiny',\n    task='transcribe',\n    language='ar',\n    use_faster_whisper=True,\n    beam_size=5,\n    ct2_compute_type='default',\n    wit_client_access_tokens=[],\n    max_cutting_duration=10,\n    min_words_per_segment=10,\n    save_files_before_compact=False,\n    save_yt_dlp_responses=False,\n    output_sample=0,\n    output_formats=['txt', 'srt'],\n    output_dir='.',\n  )\n\n  for progress in farrigh(config):\n    print(progress)\n```\n\n<p dir=\"rtl\">\u062f\u0627\u0644\u0629 \"\u0641\u064e\u0631\u0651\u0650\u063a\u0652\" <code>farrigh</code> \u0647\u064a \u0639\u0628\u0627\u0631\u0629 \u0639\u0646 \u0645\u064f\u0648\u064e\u0644\u0651\u0650\u062f\u0652 (Generator) \u064a\u0642\u0648\u0645 \u0628\u062a\u0648\u0644\u064a\u062f \u0627\u0644\u062d\u0627\u0644\u0629 \u0627\u0644\u062d\u0627\u0644\u064a\u0629 \u0644\u0644\u062a\u0641\u0631\u064a\u063a \u0648\u0623\u064a\u0646 \u0648\u0635\u0644\u062a \u0627\u0644\u0639\u0645\u0644\u064a\u0629. \u0625\u0630\u0627 \u0644\u0645 \u062a\u0643\u0646 \u0628\u062d\u0627\u062c\u0629 \u0625\u0644\u0649 \u062a\u062a\u0628\u0639 \u0647\u0630\u0627 \u0627\u0644\u0623\u0645\u0631\u060c \u064a\u0645\u0643\u0646\u0643 \u0627\u0644\u0627\u0633\u062a\u063a\u0646\u0627\u0621 \u0639\u0646 \u062d\u0644\u0642\u0629 \u0627\u0644\u062f\u0648\u0631\u0627\u0646 \u0645\u0646 \u062e\u0644\u0627\u0644 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 <code>deque</code> \u0643\u0627\u0644\u062a\u0627\u0644\u064a:</p>\n\n```python\nfrom collections import deque\n\nfrom tafrigh import farrigh, Config\n\nif __name__ == '__main__':\n  config = Config(...)\n\n  deque(farrigh(config), maxlen=0)\n```\n\n<hr>\n\n<p dir=\"rtl\">\u062a\u0645 \u0627\u0644\u0627\u0639\u062a\u0645\u0627\u062f \u0628\u0634\u0643\u0644 \u0643\u0628\u064a\u0631 \u0639\u0644\u0649 \u0645\u0633\u062a\u0648\u062f\u0639 <a href=\"https://github.com/m1guelpf/yt-whisper\">yt-whisper</a> \u0644\u0625\u0646\u062c\u0627\u0632 \u062a\u0641\u0631\u064a\u063a \u0628\u0634\u0643\u0644 \u0623\u0633\u0631\u0639.</p>\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 \u0627\u0644\u0643\u062a\u0628 \u0627\u0644\u0645\u064f\u064a\u0633\u0651\u0631\u0629  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "\u062a\u0641\u0631\u064a\u063a \u0627\u0644\u0646\u0635\u0648\u0635 \u0648\u0625\u0646\u0634\u0627\u0621 \u0645\u0644\u0641\u0627\u062a SRT \u0648 VTT \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0646\u0645\u0627\u0630\u062c Whisper \u0648\u062a\u0642\u0646\u064a\u0629 wit.ai.",
    "version": "1.1.2",
    "project_urls": {
        "homepage": "https://github.com/ieasybooks/tafrigh",
        "repository": "https://github.com/ieasybooks/tafrigh"
    },
    "split_keywords": [
        "tafrigh",
        "speech-to-text",
        "wit.ai",
        "whisper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "853426566db1917ac6e4315e14048afedac23c7875ad571f6ed5f19f81d6d92f",
                "md5": "e4f180cfa6b6caf11c11fc573ad39e2d",
                "sha256": "5280c09c688b2ce397eb1023ee99118409c617e98ae09e95ac9d6dff4fa672b2"
            },
            "downloads": -1,
            "filename": "tafrigh-1.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e4f180cfa6b6caf11c11fc573ad39e2d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 25165,
            "upload_time": "2023-12-11T13:45:25",
            "upload_time_iso_8601": "2023-12-11T13:45:25.569741Z",
            "url": "https://files.pythonhosted.org/packages/85/34/26566db1917ac6e4315e14048afedac23c7875ad571f6ed5f19f81d6d92f/tafrigh-1.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "11dd892eba807358608180499344633142a3ed945c26bb064dc94c075c855222",
                "md5": "bc1769dd41aba3f8aa7e702c8b5b1a66",
                "sha256": "71fcaa2c67391864d6d395a907b1409dcff4bfeb9f3c3ac26c76f62023172729"
            },
            "downloads": -1,
            "filename": "tafrigh-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bc1769dd41aba3f8aa7e702c8b5b1a66",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 27169,
            "upload_time": "2023-12-11T13:45:31",
            "upload_time_iso_8601": "2023-12-11T13:45:31.974924Z",
            "url": "https://files.pythonhosted.org/packages/11/dd/892eba807358608180499344633142a3ed945c26bb064dc94c075c855222/tafrigh-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-11 13:45:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ieasybooks",
    "github_project": "tafrigh",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tafrigh"
}
        
Elapsed time: 0.15314s