IntelInlet
Studio journal
Local AI and deployment / / 3 min read

Semantic clip search on 8 GB: segment transcripts and verify top-five hits

Preserve timecodes, separate embedding memory from search cost, and evaluate retrieval on playable clips.

A search for ‘fit a windshield to the microphone’ might correspond to a transcript saying ‘slide the furry cover over it’. Exact text misses the paraphrase. A semantic query may retrieve every mention of microphones. Label a playable answer interval for each of ten questions first.

Procedure

  1. Keep a clip ID, source interval, transcript and neighboring sentences. Split at complete actions. If a pronoun loses its subject, include the preceding sentence for encoding while keeping playback anchored at the action.

  2. Choose a local embedding model that covers the source language. Encode queries and documents using its recommended conventions. With normalized embeddings, rank by dot product. Start GPU encoding in small batches and store finished vectors on CPU or disk.

  3. Establish an exact-search baseline. Ten thousand 384-dimensional float32 vectors require about 14.6 MiB for the values alone. Measure a sequential dot product before adding an approximate index with its own recall trade-off.

A three-cue index

Stage a multilingual Sentence Transformers model at ./models/embed. The candidates below stay on CPU after encoding and every match retains a source time. Judge results against labeled intervals; a universal similarity cutoff does not transfer across models.

from sentence_transformers import SentenceTransformer
model = SentenceTransformer("./models/embed", device="cpu")
cues = [(4, "Plug the microphone into the recorder."),
        (18, "Measure battery voltage."),
        (32, "Slide the wind cover onto the microphone.")]
vectors = model.encode_document([c[1] for c in cues], normalize_embeddings=True)
query = model.encode_query("How do I cut outdoor wind noise?", normalize_embeddings=True)
scores = vectors @ query
for i in scores.argsort()[::-1]:
    print(cues[i][0], round(float(scores[i]), 3), cues[i][1])

Replace the third line with just ‘put it on’. Encode it alone and then with the preceding sentence about microphone wind noise. The difference gives you a traceable segmentation experiment.

Choosing an approach

Text unit Strong point Failure mode
Isolated sentence Exact terminology Unresolved pronouns
Action plus preceding sentence Paraphrased intent Details buried in long chunks
Keyword and vector results Model numbers and intent Duplicate hits require merging

Check the result

If eight of ten questions have a correct interval in their first five results, per-query hit@5 is 0.8. Open all eight timecodes: a closing remark can contain the right terminology without showing the action. Hold the model and questions fixed while comparing segmentation rules.

When indexing notes, use the vault restore drill to check paths after a move.

Frequently asked questions

Do I rebuild after changing embedding models?

Re-encode documents. Equal dimensions can still describe different spaces. Record the model revision and normalization scheme.

Why does a correct sentence lead to the wrong shot?

A transcript describes the soundtrack. Check the picture at the stored interval and add visual tags when needed.

References

Related reading