{"id":20,"date":"2026-11-04T18:22:13","date_gmt":"2026-11-04T18:22:13","guid":{"rendered":"https:\/\/globalcorpora.com\/blog\/yt-dlp-audio-only-download-for-speech-datasets\/"},"modified":"2026-11-04T18:22:13","modified_gmt":"2026-11-04T18:22:13","slug":"yt-dlp-audio-only-download-for-speech-datasets","status":"publish","type":"post","link":"https:\/\/globalcorpora.com\/blog\/yt-dlp-audio-only-download-for-speech-datasets\/","title":{"rendered":"yt-dlp Audio Only: Download YouTube Audio for Speech Datasets"},"content":{"rendered":"<p>For ASR, TTS and speech-LLM training you rarely need the video, yet many pipelines still download it, or download audio and then re-encode it to MP3 \"for compatibility\". This guide covers the yt-dlp audio-only path: how to select the right stream, keep it bit-for-bit, pick the original-language track on videos with dubbed audio, filter before downloading, and do the 16 kHz conversion once, at training time. Flags were checked against the yt-dlp README and source at release <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/releases\/tag\/2026.10.26\">2026.10.26<\/a>.<\/p>\n<h2>TL;DR<\/h2>\n<ul>\n<li>Use <code>-f ba<\/code> (<code>bestaudio<\/code>). It selects audio-only formats. Don't use <code>ba*<\/code>, which can return a muxed video file.<\/li>\n<li><code>-x<\/code> with the default <code>--audio-format best<\/code> doesn't re-encode. YouTube's Opus-in-WebM gets stream-copied to <code>.opus<\/code>, and M4A stays as it is. Only an explicit target like <code>mp3<\/code> triggers a lossy re-encode.<\/li>\n<li>On videos with several audio tracks, add <code>-S lang<\/code>. yt-dlp marks the original track with the highest language preference, but YouTube's default sort only uses it as a tiebreaker after quality and codec.<\/li>\n<li>Store the native Opus\/M4A. Convert to 16 kHz mono with <code>ffmpeg -ac 1 -ar 16000<\/code> when you build training shards, not when you download.<\/li>\n<li>Audio is cheap on bandwidth: 100k hours at 160 kbps is 7.2 TB. At that size, request rate limits cost you more time than the link does.<\/li>\n<\/ul>\n<h2>Select the audio stream, not the video<\/h2>\n<p>YouTube serves audio and video as separate DASH streams, so you can download just the audio. The yt-dlp <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/blob\/master\/README.md#format-selection\">format selection docs<\/a> define <code>ba<\/code>\/<code>bestaudio<\/code> as \"the best quality <strong>audio-only<\/strong> format\", equivalent to <code>best*[vcodec=none]<\/code>. <code>ba*<\/code> means \"best format that contains audio\" and may include video. The README marks it \"Do not use!\".<\/p>\n<p>Before you script anything, look at what a video actually offers:<\/p>\n<pre><code>yt-dlp -F 'https:\/\/www.youtube.com\/watch?v=VIDEO_ID'<\/code><\/pre>\n<p>The audio-only rows show the codec, bitrate, sample rate (<code>asr<\/code>) and, on videos that have it, a language in brackets plus track notes such as <code>(original)<\/code> or <code>(default)<\/code>.<\/p>\n<h3>YouTube's audio-only formats<\/h3>\n<p>There are two families: Opus in a WebM container and AAC in an M4A (MP4) container. yt-dlp no longer ships a hardcoded itag table. It now reads codec, bitrate and sample rate from YouTube's player response. The last version that had the table (<a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/blob\/2024.12.23\/yt_dlp\/extractor\/youtube.py\">2024.12.23<\/a>) listed these nominal values:<\/p>\n<table>\n<thead>\n<tr>\n<th>itag<\/th>\n<th>Container<\/th>\n<th>Codec<\/th>\n<th>Nominal bitrate (old yt-dlp table)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>249<\/td>\n<td>webm<\/td>\n<td>Opus<\/td>\n<td>50 kbps<\/td>\n<\/tr>\n<tr>\n<td>250<\/td>\n<td>webm<\/td>\n<td>Opus<\/td>\n<td>70 kbps<\/td>\n<\/tr>\n<tr>\n<td>251<\/td>\n<td>webm<\/td>\n<td>Opus<\/td>\n<td>160 kbps<\/td>\n<\/tr>\n<tr>\n<td>139<\/td>\n<td>m4a<\/td>\n<td>AAC<\/td>\n<td>48 kbps<\/td>\n<\/tr>\n<tr>\n<td>140<\/td>\n<td>m4a<\/td>\n<td>AAC<\/td>\n<td>128 kbps<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Treat these as labels, not measurements. Opus here is variable-bitrate, so the real average depends on the content and is often below the nominal figure. Which itags exist also varies by video and player client. The current extractor's own test suite marks itag 141 (256 kbps AAC) as \"not served anymore\". Check <code>-F<\/code> for real numbers.<\/p>\n<p>Some videos also offer <strong>DRC<\/strong> (dynamic range compression) variants, which show up as format IDs like <code>251-drc<\/code> with \"DRC\" in the note. The <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/blob\/master\/yt_dlp\/extractor\/youtube\/_video.py\">YouTube extractor<\/a> ranks them slightly below the regular stream. If you want uncompressed dynamics, exclude them explicitly with <code>-f 'ba[format_id!*=drc]\/ba'<\/code>.<\/p>\n<h3>Format sorting for audio (<code>-S<\/code>)<\/h3>\n<p><code>-S<\/code> changes what counts as \"best\". The <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/blob\/master\/README.md#sorting-formats\">sorting docs<\/a> list these audio-relevant fields:<\/p>\n<ul>\n<li><code>acodec<\/code>: <code>flac<\/code>\/<code>alac<\/code> &gt; <code>wav<\/code>\/<code>aiff<\/code> &gt; <code>opus<\/code> &gt; <code>vorbis<\/code> &gt; <code>aac<\/code> &gt; <code>mp4a<\/code> &gt; <code>mp3<\/code> &gt; \u2026<\/li>\n<li><code>abr<\/code> (average audio bitrate, kbps), <code>asr<\/code> (sample rate, Hz), <code>channels<\/code><\/li>\n<li><code>size<\/code> (exact or approximate file size)<\/li>\n<li><code>lang<\/code>: \"the language preference as determined by the extractor (e.g. original language preferred over audio description)\"<\/li>\n<\/ul>\n<p>Fields sort descending; a <code>+<\/code> prefix reverses that. Your <code>-S<\/code> fields are placed ahead of the extractor's order. That matters on YouTube, whose extractor sets its own order (<code>quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto<\/code>), so <code>lang<\/code> normally comes near the end. Useful combinations:<\/p>\n<ul>\n<li><code>-f ba -S lang<\/code>: original track first, then the usual quality order.<\/li>\n<li><code>-f 'ba[asr&gt;=16000]' -S lang,+size<\/code>: the smallest audio-only file that still has at least a 16 kHz sample rate. This makes sense if you're storage-bound and only train at 16 kHz. Measure WER on a sample before committing to it.<\/li>\n<li><code>-f 'ba[ext=m4a]\/ba'<\/code>: prefer AAC\/M4A, for example if your decoder stack handles MP4 more easily than WebM\/Ogg.<\/li>\n<\/ul>\n<h2>Dubbed and multi-language audio tracks<\/h2>\n<p>YouTube can attach several audio tracks to one video: the original, AI or human dubs, and audio description. For a speech dataset, a dub labeled with the original video's metadata is a data-quality bug. From the extractor source, this is how yt-dlp exposes them:<\/p>\n<ul>\n<li>Each audio format's <code>language<\/code> is the part of YouTube's audio track ID before the dot.<\/li>\n<li>A track whose display name contains \"original\" gets <code>language_preference<\/code> 10 and an <code>(original)<\/code> note. The default track gets 5, audio-description tracks get &minus;10 with a language like <code>en-desc<\/code>, and all others get &minus;1.<\/li>\n<li>On single-track videos, yt-dlp fills <code>language<\/code> on audio formats from the original-language auto-caption track when one exists. Without one, <code>language<\/code> can be empty.<\/li>\n<\/ul>\n<p>So <code>-S lang<\/code> picks the original track whenever YouTube labels it. To require a specific language, use a format filter. String filters support <code>^=<\/code>, <code>$=<\/code>, <code>*=<\/code>, <code>~=<\/code> and negation with <code>!<\/code>:<\/p>\n<pre><code># English audio, but never the audio-description track\nyt-dlp -f 'ba[language^=en][language!$=desc]' -S lang URL<\/code><\/pre>\n<p>If no format matches, that video fails with \"Requested format is not available\". yt-dlp then moves on to the next URL, because <code>--no-abort-on-error<\/code> is the default. Append <code>\/ba<\/code> only if you'd rather get some audio than none. A format filter also excludes formats whose <code>language<\/code> is unknown, unless you write it as <code>language^=?en<\/code>.<\/p>\n<h2><code>-x<\/code>, <code>--audio-format<\/code> and why not MP3<\/h2>\n<p><code>-x<\/code>\/<code>--extract-audio<\/code> needs ffmpeg and ffprobe. <code>--audio-format<\/code> accepts <code>best<\/code> (default), <code>aac<\/code>, <code>alac<\/code>, <code>flac<\/code>, <code>m4a<\/code>, <code>mp3<\/code>, <code>opus<\/code>, <code>vorbis<\/code> and <code>wav<\/code>. Here is what the <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/blob\/master\/yt_dlp\/postprocessor\/ffmpeg.py\"><code>FFmpegExtractAudioPP<\/code> source<\/a> actually does:<\/p>\n<ul>\n<li><strong><code>best<\/code> + <code>.m4a<\/code><\/strong>: does nothing (\"already in a common audio format\").<\/li>\n<li><strong><code>best<\/code> + <code>.webm<\/code><\/strong>: ffprobe reports Opus, so ffmpeg runs with <code>-acodec copy<\/code> into a <code>.opus<\/code> file. It's lossless and quick.<\/li>\n<li><strong>A different target (e.g. <code>mp3<\/code>)<\/strong>: a full decode and re-encode with libmp3lame.<\/li>\n<\/ul>\n<p>Re-encoding Opus or AAC to MP3 stacks one lossy codec on top of another. Quality can only go down, and you pay CPU for every hour of audio. <code>--audio-quality<\/code> (0 best to 10 worst for VBR, or a bitrate like <code>128K<\/code>; default 5) only matters when a re-encode happens. The built-in preset <code>-t mp3<\/code> expands to <code>-f 'ba[acodec^=mp3]\/ba\/b' -x --audio-format mp3<\/code>. That suits a music player, not a corpus.<\/p>\n<h2>Convert to 16 kHz mono at training time<\/h2>\n<p>Many ASR models, including Whisper and wav2vec 2.0, take 16 kHz mono input. Do the conversion when you build shards, not at download:<\/p>\n<pre><code># 16 kHz, mono, 16-bit PCM WAV\nffmpeg -nostdin -i abc123.opus -vn -ac 1 -ar 16000 -c:a pcm_s16le abc123.wav\n\n# Same, as FLAC (lossless, smaller than WAV)\nffmpeg -nostdin -i abc123.opus -vn -ac 1 -ar 16000 -sample_fmt s16 -c:a flac abc123.flac<\/code><\/pre>\n<p><code>-ac<\/code> sets the channel count and <code>-ar<\/code> the sample rate (<a href=\"https:\/\/ffmpeg.org\/ffmpeg.html\">ffmpeg docs<\/a>). Keeping the native file means you can later produce 24 kHz for TTS, keep stereo, or try another resampler without downloading again.<\/p>\n<p>If you really only want WAV on disk, you can do the conversion inside yt-dlp with <code>--postprocessor-args<\/code> (alias <code>--ppa<\/code>). The <code>ExtractAudio+ffmpeg_o<\/code> key passes the arguments to ffmpeg just before the output file, and only when the ExtractAudio step runs it:<\/p>\n<pre><code>yt-dlp -f ba -S lang -x --audio-format wav \\\n  --ppa 'ExtractAudio+ffmpeg_o:-ac 1 -ar 16000' \\\n  -o '%(id)s.%(ext)s' URL<\/code><\/pre>\n<h2>Cut segments with <code>--download-sections<\/code><\/h2>\n<p><code>--download-sections<\/code> takes a chapter-title regex or, with a <code>*<\/code> prefix, a time range. Negative timestamps count from the end, <code>*from-url<\/code> uses the URL's start\/end time, and the flag can be repeated. It needs ffmpeg.<\/p>\n<pre><code># Minutes 10\u201320 only, plus any chapter whose title matches \"interview\"\nyt-dlp -f ba -S lang -x \\\n  --download-sections '*10:00-20:00' --download-sections 'interview' \\\n  -o '%(id)s_%(section_start)s.%(ext)s' URL<\/code><\/pre>\n<p>Use this when you already have timestamps, for example from a dataset manifest. Treat the cut edges as approximate, and trim to exact sample boundaries in your own preprocessing if your labels need it.<\/p>\n<h2>Filter before you download<\/h2>\n<p><code>--match-filters<\/code> accepts any output-template field, compared with the same operators as format filtering. <code>&amp;<\/code> joins conditions, <code>!field<\/code> means \"field absent or false\", and repeating the flag ORs the filters:<\/p>\n<pre><code>yt-dlp -f ba -S lang -x \\\n  --match-filters '!is_live &amp; duration&gt;=60 &amp; duration&lt;=7200 &amp; language^=en' \\\n  URL_OR_PLAYLIST<\/code><\/pre>\n<p>A detail that matters for language: YouTube doesn't set a video-level <code>language<\/code>, but <code>language<\/code> is a format field. yt-dlp evaluates match filters once before format selection, where missing format fields pass, and again in <code>process_info<\/code> after selection, before any media is downloaded. In practice <code>language^=en<\/code> tests the audio track you're about to download. Together with <code>-S lang<\/code>, that means \"the original audio is English\". Videos with no language info are rejected unless you write <code>language^=?en<\/code>.<\/p>\n<p>Filters on <code>duration<\/code> and <code>is_live<\/code> can drop playlist entries early, before a full extraction, when the playlist listing already includes those fields. For license filtering (Creative Commons), see <a href=\"https:\/\/globalcorpora.com\/blog\/creative-commons-youtube-videos-for-ai-training\/\">our Creative Commons guide<\/a>.<\/p>\n<h2>Provenance: info.json, embedded metadata, archive<\/h2>\n<ul>\n<li><code>--write-info-json<\/code> writes the full metadata next to the file, including the selected <code>format_id<\/code>, <code>language<\/code>, <code>asr<\/code>, <code>abr<\/code>, the license and the channel. That's your per-sample lineage.<\/li>\n<li><code>--embed-metadata<\/code> writes title, uploader, date and similar fields into the audio file's tags, so they stay with the file if it gets separated from its JSON. (The infojson attachment only applies to mkv\/mka.)<\/li>\n<li><code>--download-archive archive.txt<\/code> records IDs so reruns skip completed videos.<\/li>\n<li>Name files by <code>%(id)s<\/code>, not by title.<\/li>\n<\/ul>\n<p>Transcripts are a separate topic: our guide to <a href=\"https:\/\/globalcorpora.com\/blog\/yt-dlp-download-subtitles-auto-captions\/\">yt-dlp subtitles and auto captions<\/a> covers manual vs ASR tracks, the <code>-orig<\/code> track and VTT cleanup.<\/p>\n<h2>Throttling: audio is request-bound<\/h2>\n<p>An audio file is a small fraction of the size of its video, so per-video request overhead and YouTube's rate limits set your throughput, not bandwidth. The built-in <code>-t sleep<\/code> preset expands to <code>--sleep-subtitles 5 --sleep-requests 0.75 --sleep-interval 10 --max-sleep-interval 20<\/code>. For \"Sign in to confirm you're not a bot\", PO tokens, cookies and spreading load across IPs, see <a href=\"https:\/\/globalcorpora.com\/blog\/yt-dlp-sign-in-to-confirm-not-a-bot\/\">the troubleshooting guide<\/a>.<\/p>\n<h2>Storage math for 100k hours<\/h2>\n<p>Formula: bytes = bitrate (bits\/s) &divide; 8 &times; seconds. 100,000 h &times; 3,600 s = 360,000,000 s. The bitrates below are <strong>assumptions<\/strong>; your real Opus\/AAC averages will differ.<\/p>\n<table>\n<thead>\n<tr>\n<th>Storage format (assumed bitrate)<\/th>\n<th>Per hour<\/th>\n<th>100k hours<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Native AAC\/Opus at 128 kbps<\/td>\n<td>57.6 MB<\/td>\n<td>5.76 TB<\/td>\n<\/tr>\n<tr>\n<td>Native Opus at 160 kbps<\/td>\n<td>72 MB<\/td>\n<td>7.2 TB<\/td>\n<\/tr>\n<tr>\n<td>16 kHz &times; 16-bit &times; mono WAV = 256 kbps<\/td>\n<td>115.2 MB<\/td>\n<td>11.52 TB<\/td>\n<\/tr>\n<tr>\n<td>48 kHz &times; 16-bit &times; stereo WAV = 1,536 kbps<\/td>\n<td>691.2 MB<\/td>\n<td>69.12 TB<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For example, 160,000 &divide; 8 &times; 360,000,000 = 7,200,000,000,000 bytes = 7.2 TB. FLAC at 16 kHz mono comes in below the WAV figure, but the ratio depends on the content, so measure it on a sample. Transfer time: 7.2 TB is 57.6 Tbit, or 57,600 s \u2248 16 h at a sustained 1 Gbps.<\/p>\n<p>The request side looks different. Assume an average video length of 10 minutes: 100k hours is then 600,000 videos. With <code>-t sleep<\/code> the per-video sleep averages 15 s, so one worker starts at most 240 videos\/hour. That's 2,500 worker-hours, about 104 hours of wall-clock time with 24 workers. For link and egress sizing, see <a href=\"https:\/\/globalcorpora.com\/blog\/bandwidth-for-large-scale-video-downloads\/\">bandwidth for large-scale video downloads<\/a>.<\/p>\n<h2>Goal \u2192 command<\/h2>\n<table>\n<thead>\n<tr>\n<th>Goal<\/th>\n<th>Command (add URL)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Best native audio, original track, no re-encode<\/td>\n<td><code>yt-dlp -f ba -S lang -x<\/code><\/td>\n<\/tr>\n<tr>\n<td>Same, excluding DRC variants<\/td>\n<td><code>yt-dlp -f 'ba[format_id!*=drc]\/ba' -S lang -x<\/code><\/td>\n<\/tr>\n<tr>\n<td>AAC\/M4A only<\/td>\n<td><code>yt-dlp -f 'ba[ext=m4a]' -S lang<\/code><\/td>\n<\/tr>\n<tr>\n<td>Smallest file, still \u226516 kHz<\/td>\n<td><code>yt-dlp -f 'ba[asr&gt;=16000]' -S lang,+size -x<\/code><\/td>\n<\/tr>\n<tr>\n<td>English original audio only<\/td>\n<td><code>yt-dlp -f ba -S lang -x --match-filters 'language^=en'<\/code><\/td>\n<\/tr>\n<tr>\n<td>16 kHz mono WAV straight away<\/td>\n<td><code>yt-dlp -f ba -S lang -x --audio-format wav --ppa 'ExtractAudio+ffmpeg_o:-ac 1 -ar 16000'<\/code><\/td>\n<\/tr>\n<tr>\n<td>Only a time range<\/td>\n<td><code>yt-dlp -f ba -S lang -x --download-sections '*10:00-20:00'<\/code><\/td>\n<\/tr>\n<tr>\n<td>Corpus run with provenance and pacing<\/td>\n<td><code>yt-dlp -f ba -S lang -x --embed-metadata --write-info-json --download-archive archive.txt -o '%(id)s.%(ext)s' -t sleep<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Python API<\/h2>\n<p>The same setup through <code>yt_dlp.YoutubeDL<\/code>. The repo's <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\/blob\/master\/devscripts\/cli_to_api.py\"><code>devscripts\/cli_to_api.py<\/code><\/a> translates any CLI flags into these parameters.<\/p>\n<pre><code>import yt_dlp\nfrom yt_dlp.utils import match_filter_func\n\nURLS = ['https:\/\/www.youtube.com\/watch?v=VIDEO_ID']\n\nydl_opts = {\n    'format': 'ba[format_id!*=drc]\/ba',\n    'format_sort': ['lang'],                      # original audio track first\n    'match_filter': match_filter_func('!is_live &amp; duration&gt;=60 &amp; duration&lt;=7200'),\n    'paths': {'home': 'audio_raw'},\n    'outtmpl': {'default': '%(id)s.%(ext)s'},\n    'writeinfojson': True,\n    'download_archive': 'archive.txt',\n    'sleep_interval_requests': 0.75,\n    'sleep_interval': 10,\n    'max_sleep_interval': 20,\n    'postprocessors': [\n        # 'best' = stream-copy WebM\/Opus to .opus, leave .m4a untouched\n        {'key': 'FFmpegExtractAudio', 'preferredcodec': 'best'},\n        {'key': 'FFmpegMetadata', 'add_metadata': True},\n    ],\n    # For 16 kHz mono WAV instead: set preferredcodec to 'wav' and add\n    # 'postprocessor_args': {'extractaudio+ffmpeg_o': ['-ac', '1', '-ar', '16000']},\n}\n\nwith yt_dlp.YoutubeDL(ydl_opts) as ydl:\n    retcode = ydl.download(URLS)<\/code><\/pre>\n<p>Postprocessors run in list order, so audio extraction happens before metadata embedding. Keys in <code>postprocessor_args<\/code> are lowercase.<\/p>\n<h2>Compliance<\/h2>\n<p>YouTube's Terms of Service restrict automated access and downloading. Copyright and licensing apply to audio just as to video; some teams collect only Creative Commons material and record the license per sample. Voices are personal data under regimes like GDPR, and a voice can identify a speaker even without a name attached. That matters especially for TTS and voice-cloning use. Honor takedown and opt-out requests, and keep the lineage (video ID, channel, info.json) you need to act on them. Get legal review for your jurisdiction and use case.<\/p>\n<h2>If you'd rather not run this yourself<\/h2>\n<p>Corpora offers <a href=\"https:\/\/globalcorpora.com\/#pricing\">dedicated 1\u201340 Gbps unmetered proxy capacity<\/a> (HTTP(S) and SOCKS5, compatible with yt-dlp) for teams running their own stack. There is also a fully managed option that delivers audio, subtitles and metadata as JSONL\/Parquet with sha256 checksums and manifests to S3, GCS or Azure Blob, starting with a free sample batch. <a href=\"https:\/\/globalcorpora.com\/#contact\">Contact us<\/a> to scope it.<\/p>\n<h2>FAQ<\/h2>\n<h3>How do I download only the audio from YouTube with yt-dlp?<\/h3>\n<p><code>yt-dlp -f ba -x URL<\/code>. <code>-f ba<\/code> selects the best audio-only stream. <code>-x<\/code> with the default <code>best<\/code> format turns the WebM into <code>.opus<\/code> by stream copy and leaves M4A untouched, with no re-encoding. Add <code>-S lang<\/code> to prefer the original track on dubbed videos.<\/p>\n<h3>Is <code>--audio-format mp3<\/code> lower quality?<\/h3>\n<p>Yes. YouTube's audio-only streams are Opus or AAC, so yt-dlp has to decode the Opus or AAC and re-encode it, adding a second lossy generation. Keep the native format and convert to WAV\/FLAC when you need PCM.<\/p>\n<h3>Why did yt-dlp download a dubbed audio track?<\/h3>\n<p>On YouTube, the extractor's default sort puts quality and codec ahead of <code>lang<\/code>, so the original-track preference only breaks ties. Pass <code>-S lang<\/code> to make it the first criterion, and check <code>-F<\/code> for the <code>(original)<\/code> note.<\/p>\n<h3>What sample rate should I store for ASR training?<\/h3>\n<p>Store whatever YouTube served (check <code>asr<\/code> in <code>-F<\/code>). Resample to the model's rate, typically 16 kHz mono for ASR, with <code>ffmpeg -ac 1 -ar 16000<\/code> when building training shards.<\/p>\n<h3>Does <code>--download-sections<\/code> still download the whole file?<\/h3>\n<p>No. yt-dlp passes each range to ffmpeg as input-side <code>-ss<\/code>\/<code>-t<\/code>, so ffmpeg seeks into the stream instead of reading it from the start. You can pull labeled spans from long videos without storing the rest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>yt-dlp audio only downloads for ASR and TTS datasets: pick bestaudio, keep native Opus or M4A, select the original track, convert to 16 kHz at train time.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[34,32,36,35,33,7],"class_list":["post-20","post","type-post","status-publish","format-standard","hentry","category-guides","tag-asr","tag-audio-only","tag-ffmpeg","tag-opus","tag-speech-datasets","tag-yt-dlp"],"_links":{"self":[{"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/posts\/20","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":0,"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:attachment":[{"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/globalcorpora.com\/blog\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}