Documentation Index
Fetch the complete documentation index at: https://lancedb-bcbb4faf-docs-namespace-typescript-examples.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
View on Hugging Face
Source dataset card and downloadable files for
lance-format/librispeech-clean-lance.clean configuration, sourced from openslr/librispeech_asr. Each row is one utterance with inline FLAC audio bytes, the reference transcript, a sentence-transformers embedding of that transcript, and speaker/chapter metadata — all available directly from the Hub at hf://datasets/lance-format/librispeech-clean-lance/data.
Key features
- Inline FLAC bytes in the
audiocolumn at 16 kHz mono, with no re-encoding from the upstream parquet. - Sentence-transformers embedding of the transcript in
text_emb(all-MiniLM-L6-v2, 384-dim, cosine-normalized) with a bundledIVF_PQindex for semantic transcript search. - Pre-built
INVERTEDFTS index ontextandBTREEindices onid,speaker_id, andchapter_idfor keyword search and stable lookup by identifier. - Per-utterance metadata —
speaker_id,chapter_id,num_chars,sampling_rate— that downstream filters can stack on.
Splits
| Split | Source config | Rows | Description |
|---|---|---|---|
dev_clean.lance | dev.clean | 2,703 | Standard ASR validation set |
test_clean.lance | test.clean | 2,620 | Standard ASR test set |
train_clean_100.lance | train.clean.100 | 28,539 | 100-hour clean training subset |
The 360-hour and 500-hour LibriSpeech subsets (train.360,train.other.500) are not bundled here. To extend, pointlibrispeech/dataprep.pyat additional splits.
Schema
| Column | Type | Notes |
|---|---|---|
id | string | Utterance id (e.g. 1272-128104-0000) |
audio | large_binary | Inline FLAC bytes (16 kHz mono) |
sampling_rate | int32 | Always 16,000 |
text | string | Reference transcript |
speaker_id | int64 | LibriVox speaker id |
chapter_id | int64 | LibriVox chapter id |
num_chars | int32 | Length of text in characters |
text_emb | fixed_size_list<float32, 384> | sentence-transformers all-MiniLM-L6-v2 (cosine-normalized) |
Pre-built indices
IVF_PQontext_emb— semantic transcript search (cosine)INVERTED(FTS) ontext— keyword and hybrid searchBTREEonid,speaker_id,chapter_id— fast lookup by identifier
Why Lance?
- Blazing Fast Random Access: Optimized for fetching scattered rows, making it ideal for random sampling, real-time ML serving, and interactive applications without performance degradation.
- Native Multimodal Support: Store text, embeddings, and other data types together in a single file. Large binary objects are loaded lazily, and vectors are optimized for fast similarity search.
- Native Index Support: Lance comes with fast, on-disk, scalable vector and FTS indexes that sit right alongside the dataset on the Hub, so you can share not only your data but also your embeddings and indexes without your users needing to recompute them.
- Efficient Data Evolution: Add new columns and backfill data without rewriting the entire dataset. This is perfect for evolving ML features, adding new embeddings, or introducing moderation tags over time.
- Versatile Querying: Supports combining vector similarity search, full-text search, and SQL-style filtering in a single query, accelerated by on-disk indexes.
- Data Versioning: Every mutation commits a new version; previous versions remain intact on disk. Tags pin a snapshot by name, so retrieval systems and training runs can reproduce against an exact slice of history.
Load with datasets.load_dataset
You can load Lance datasets via the standard HuggingFace datasets interface, suitable when your pipeline already speaks Dataset / IterableDataset or you want a quick streaming sample.
Load with LanceDB
LanceDB is the embedded retrieval library built on top of the Lance format (docs), and is the interface most users interact with. Each.lance file in data/ is a table — open by name (dev_clean, test_clean, train_clean_100). The same handle is used by the Search, Curate, Evolve, Versioning, and Materialize-a-subset sections below.
Load with Lance
pylance is the Python binding for the Lance format and works directly with the format’s lower-level APIs. Reach for it when you want to inspect dataset internals — schema, scanner, fragments, the list of pre-built indices.
Tip — for production use, download locally first. Streaming from the Hub works for exploration, but heavy random access, ANN search, and audio decoding are far faster against a local copy:Then point Lance or LanceDB at./librispeech-clean/data.
Search
The bundledIVF_PQ index on text_emb makes semantic transcript retrieval a single call. In production you would encode a query string through the same sentence-transformers model used at ingest (all-MiniLM-L6-v2, cosine-normalized), then pass the resulting 384-d vector to tbl.search(...). The example below uses the embedding from row 42 as a runnable stand-in.
audio blob is never touched. A top-10 semantic search moves a few kilobytes of transcript text rather than the FLAC bytes for every candidate.
Because the dataset also ships an INVERTED index on text, the same query can be issued as a hybrid search that combines the dense vector with a keyword query — useful when a name or domain term must literally appear in the transcript but you still want the semantic side to rank the rest.
metric, nprobes, and refine_factor on the vector side to trade recall against latency.
Curate
Building a focused subset of utterances usually means combining content with structure — pick utterances by a single speaker, or above a minimum transcript length, or matching a topic. Stacking predicates inside a single filtered scan keeps the result small and explicit, and the bounded.limit(500) makes it cheap to inspect.
audio column. Lance stores binary columns independently, so a metadata-only curation pass moves only the transcript text and scalar fields across the wire — even though the underlying table includes hours of inline FLAC audio.
Evolve
Lance stores each column independently, so a new column can be appended without rewriting the existing data. The lightest form is a SQL expression: derive the new column from columns that already exist, and Lance computes it once and persists it. The example below adds ais_long_utterance flag and a coarse length_bucket, either of which can then be used directly in where clauses without re-evaluating the predicate on every query.
Note: Mutations require a local copy of the dataset, since the Hub mount is read-only. See the Materialize-a-subset section at the end of this card for a streaming pattern that downloads only the rows and columns you need.
id:
Train
A common pattern for audio training is to pre-extract decoded features once into a derived LanceDB table — one row per training-ready window of log-mel frames or raw PCM samples — and train against that table with the regular projection-based dataloader.take_blobs is the mechanism that makes the extraction step tractable: each utterance’s FLAC bytes are randomly addressable, so the pass can subset audio on demand and write decoded windows into a fresh table without an external file store. Other workflows project audio directly through select_columns(...) and decode at the batch boundary, or skip audio entirely and train on the cached transcript embeddings — the right shape is workload-specific. The actual training loop is the same Permutation.identity(tbl).select_columns(...) snippet in every case; only the source table and the column list change.
Against a pre-extracted features table:
audio storage and take_blobs still earn their place around the training process — listening back to an utterance in a notebook, sampling for human review, one-off evaluation against a held-out set, and the pre-extraction pass itself. Each of those reads a small, explicit set of blobs once. What the Train section above keeps off the per-batch hot path is exactly that raw-audio decode: paying it every step is what the pre-extracted features are designed to avoid.
Versioning
Every mutation to a Lance dataset, whether it adds a column, merges labels, or builds an index, commits a new version. Previous versions remain intact on disk. You can list versions and inspect the history directly from the Hub copy; creating new tags requires a local copy since tags are writes.minilm-v1 keeps returning stable results while the dataset evolves in parallel. A training experiment pinned to the same tag can be rerun later against the exact same utterances, so changes in metrics reflect model changes rather than data drift.
Materialize a subset
Reads from the Hub are lazy, so exploratory queries only transfer the columns and row groups they touch. Mutating operations (Evolve, tag creation) need a writable backing store, and a training pipeline benefits from a local copy with fast random access to the FLAC bytes. Both can be served by a subset of the dataset rather than the full split. The pattern is to stream a filtered query through.to_batches() into a new local table; only the projected columns and matching row groups cross the wire, and the bytes never fully materialize in Python memory — including the audio column, which streams through Arrow record batches rather than being assembled in a single buffer.
./librispeech-speaker-1272 is a first-class LanceDB database. Every snippet in the Evolve, Train, and Versioning sections above works against it by swapping hf://datasets/lance-format/librispeech-clean-lance/data for ./librispeech-speaker-1272.
Source & license
Converted fromopenslr/librispeech_asr. LibriSpeech is released under CC BY 4.0 and is built from the public-domain LibriVox audiobook corpus.