New Tool Radar

Local AI

How to Boost Names with faster-whisper hotwords

Give faster-whisper a hotwords list so it spells the names in your recording correctly.

Schematic illustration with three step boxes: List the names; Transcribe with hotwords; Check the names.

Whisper often misspells unusual names, product names and place names because it has rarely seen them. faster-whisper’s hotwords setting takes a list of words to favour during decoding, so the names you care about come out right. This guide builds a hotwords list and checks the names in the transcript.

Before you start

  • Python with faster-whisper installed.
  • An audio clip containing a few unusual names, with the correct spellings written down.
  • A terminal and a text editor.

Write the hotwords list

List the names exactly as they should be spelled, for example [“Katarzyna”, “Nowak”, “Gdansk”]. Keep the list short, under a dozen words, and include only names that actually appear in the recording.

Transcribe with hotwords

Pass the list to the transcription call:

from faster_whisper import WhisperModel
model = WhisperModel("base", device="cpu", compute_type="int8")
segments, info = model.transcribe("clip.wav", hotwords="Katarzyna Nowak Gdansk")
for s in segments:
    print(s.text)

Hotwords are passed as a single space-separated string.

Check every name

Search the transcript for each name and compare with your list. Count how many are spelled correctly, then run the same clip without hotwords and count again. The hotwords run should score higher.

Worked example

Worked example: a clip with the three names “Katarzyna”, “Nowak” and “Gdansk”. Without hotwords, one or two may be misspelled; with the hotwords list, all three should appear correctly. If a name is still wrong, check that it is spelled correctly in the list itself.

Expected result

UNTESTED in this guide: no transcription was run while writing it. The expected result is that the names in the hotwords list appear with the correct spelling in the transcript.

Limitations

Hotwords favour the listed words, which can make the model hear them where they were not said, especially on a long list. Keep the list short and check the transcript for invented names after using it.

Sources

See all