### Quickstart Examples Source: https://github.com/kouhxp/yapsnap/blob/main/README.md A collection of common yapsnap usage examples including local files, URLs, timestamps, and diarization. ```bash # 1. ffmpeg on PATH (one-time, per OS — see below) # 2. Install (from PyPI, or `pip install .` from a clone) pip install yapsnap # 3. Snap something yapsnap https://www.tiktok.com/@user/video/7234567890123456789 yapsnap meeting.mp4 --timestamps yapsnap interview.mp3 --diarize # label speakers yapsnap podcast.mp3 -o ~/notes/episode.txt ``` -------------------------------- ### Install yapsnap from Source Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Clone the repository and install yapsnap locally. This is useful for development or if you need the latest changes. ```bash git clone https://github.com/kouhxp/yapsnap cd yapsnap pip install . ``` -------------------------------- ### Install yapsnap from PyPI Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Install the yapsnap package using pip. This is the recommended installation method. ```bash pip install yapsnap ``` -------------------------------- ### Use a Different Diarization Model Source: https://github.com/kouhxp/yapsnap/blob/main/README.md To use a specific diarization model like 'reverb', specify it with the --diarize-model flag. ```bash yapsnap panel.mp4 --diarize --diarize-model reverb ``` -------------------------------- ### Specify Model Directory for Different Languages Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Use the --model flag to point to a directory containing the desired language model. Alternatively, set the KROKO_MODEL environment variable. ```bash # Per-run: pass the model folder explicitly yapsnap interview.mp3 --model /path/to/kroko-french # Or set it once as your default for the session export KROKO_MODEL=/path/to/kroko-french yapsnap interview.mp3 ``` -------------------------------- ### Basic Transcription of a YouTube URL Source: https://github.com/kouhxp/yapsnap/blob/main/README.md This is the simplest way to use yapsnap. Provide a YouTube URL, and it will download the audio, transcribe it, and save the output to a .txt file. ```bash yapsnap "https://www.youtube.com/watch?v=dQw4w9WgXcQ" ``` -------------------------------- ### Keep Audio Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md For URL inputs, use `--keep-audio` to retain the downloaded audio file after processing. ```bash --keep-audio ``` -------------------------------- ### Transcribe a Local Audio File Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Use yapsnap to transcribe an audio file directly from your local system. ```bash yapsnap path/to/audio.mp3 ``` -------------------------------- ### Output Path Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Use the `-o` or `--output` flag to specify a custom path for the transcript file. The default location is `./transcripts/`. ```bash -o ./custom/path/transcript.txt ``` -------------------------------- ### Model Directory Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Override the default model directory with the `--model` flag. This flag also respects the `KROKO_MODEL` environment variable. ```bash --model ./models/ ``` -------------------------------- ### Diarize Model Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Specify the speaker segmentation model using `--diarize-model`. Options include `pyannote` (default) and `reverb`. ```bash --diarize-model pyannote ``` -------------------------------- ### Transcribe with Specified Number of Speakers Source: https://github.com/kouhxp/yapsnap/blob/main/README.md When using `--diarize`, you can optionally specify the number of speakers for potentially more accurate results. ```bash yapsnap call.mp3 --diarize --num-speakers 2 ``` -------------------------------- ### Specify Custom Output Path Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Direct the transcription output to a specific file path and name using the -o or --output option. ```bash yapsnap input.mp4 -o ./transcripts/talk.txt ``` -------------------------------- ### Transcribe with Sentence-Level Timestamps Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Enable sentence-level timestamps in the output. This adds `[MM:SS]` markers for each sentence. ```bash yapsnap input.mp4 --timestamps ``` -------------------------------- ### Speed Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md The `--speed` flag allows pre-transcription audio speedup without altering pitch. Higher values result in faster processing at a potential accuracy cost. ```bash --speed 1.4 ``` -------------------------------- ### Transcribe with Speaker Diarization Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Add speaker labels to the transcription to identify who spoke when. Each line will be prefixed with SPEAKER_00, SPEAKER_01, etc. ```bash yapsnap interview.mp3 --diarize ``` -------------------------------- ### Number of Speakers Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Use `--num-speakers` to specify the known speaker count for diarization. The default is `-1` for auto-detection. ```bash --num-speakers 2 ``` -------------------------------- ### Basic Transcription Output Source: https://github.com/kouhxp/yapsnap/blob/main/README.md This snippet shows the default output format for transcription, which is a single paragraph of UTF-8 encoded text. The output is saved to `./transcripts/` by default. ```text Welcome to the show. Today we're talking about transcription. Let's get started. ``` -------------------------------- ### Disable Audio Speed-Up Source: https://github.com/kouhxp/yapsnap/blob/main/README.md By default, yapsnap speeds up audio to 1.4x for faster transcription. Use --speed 1.0 to disable this and preserve original audio speed. ```bash yapsnap input.mp4 --speed 1.0 ``` -------------------------------- ### Timestamped Transcription Output Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Using the `--timestamps` flag, each sentence is output on a new line with its corresponding timestamp. Timestamps are based on the original audio time. ```text [00:00] Welcome to the show. [00:03] Today we're talking about transcription. [00:08] Let's get started. ``` -------------------------------- ### Keep Downloaded Audio File Source: https://github.com/kouhxp/yapsnap/blob/main/README.md When transcribing from a URL, this option prevents yapsnap from deleting the downloaded audio file after transcription. ```bash yapsnap "https://..." --keep-audio ``` -------------------------------- ### Threads Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Adjust the number of ONNX threads per worker using the `--threads` flag. Autodetection is used when set to `0`. ```bash --threads 2 ``` -------------------------------- ### Diarized Transcription Output Source: https://github.com/kouhxp/yapsnap/blob/main/README.md The `--diarize` flag adds speaker labels and timestamps to each sentence. Speaker numbers are assigned sequentially and are stable within a single run. ```text SPEAKER_00 [00:00]: Welcome to the show. SPEAKER_01 [00:03]: Glad to be here, thanks for having me. SPEAKER_00 [00:08]: Let's get started. ``` -------------------------------- ### Workers Flag Source: https://github.com/kouhxp/yapsnap/blob/main/README.md Control the number of parallel decode processes with the `--workers` flag. Set to `0` for autodetect, `1` for single stream processing. ```bash --workers 4 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.