Skip to main content

Configuration

Configure hns to match your hardware and transcription needs. By configuring the Whisper model and language, you can significantly improve transcription accuracy, optimize for speed, and tailor hns's performance to your specific requirements.

Model Selection: HNS_WHISPER_MODEL

This environment variable controls which Whisper model hns uses for transcription. The default is base, but you can choose from several others based on your needs.

To set it, you can define the environment variable in your shell.

Temporary (current session only):

export HNS_WHISPER_MODEL="distil-large-v3.5"
hns

Permanent:

Add the following line to your shell's configuration file.

~/.bashrc or ~/.zshrc
export HNS_WHISPER_MODEL="distil-large-v3.5"

Then, reload your shell's configuration:

# For bash
source ~/.bashrc

# For zsh
source ~/.zshrc

Available Models

Here are the models you can choose from. They are hosted on Hugging Face by Systran and other contributors.

Model NameSizeType
tiny.en~75MBEnglish only
tiny~75MBMultilingual
base.en~145MBEnglish only
base~145MBMultilingual
small.en~484MBEnglish only
small~484MBMultilingual
medium.en~1.53GBEnglish only
medium~1.53GBMultilingual
large-v1~3.09GBMultilingual
large-v2~3.09GBMultilingual
large-v3~3.09GBMultilingual
large~3.09GBMultilingual
distil-large-v2~1.51GBMultilingual
distil-medium.en~789MBEnglish only
distil-small.en~332MBEnglish only
distil-large-v3~1.51GBMultilingual
distil-large-v3.5~1.51GBMultilingual
large-v3-turbo~1.62GBMultilingual
turbo~1.62GBMultilingual

Model Recommendations

Which model to use?
  • Best Overall: distil-large-v3.5 is the recommended choice for most users. It offers accuracy close to large-v3 with about half the RAM usage (~1.5GB) and is ~6x faster. It produces high-quality transcriptions with correct punctuation.
  • Maximum Accuracy: Use large-v3 when you need the highest accuracy and speed or memory (~3GB RAM) are not concerns.
  • Fast & Light: For faster transcription and lower RAM usage (~0.6GB), consider small. It's about 3-4x faster than distil-large-v3.5 with decent accuracy.
  • Featherweight: tiny is the smallest and fastest model, suitable for memory-constrained environments.

For English-only transcription, always prefer the .en variants (e.g., small.en). They are more accurate and performant for English than their multilingual counterparts.

Language Selection: HNS_LANG

This variable forces hns to transcribe in a specific language, which can improve accuracy over the default auto-detection, especially for non-English languages.

tip
  • While Whisper's auto-detection is powerful, we strongly recommend setting HNS_LANG explicitly. This improves accuracy and prevents potential misidentification of the spoken language.
  • Even if you primarily speak English, setting HNS_LANG to en can enhance transcription quality.

Set the variable to the ISO 639-1 code of your target language.

Temporary (current session only):

export HNS_LANG="ja"
hns

Permanent:

~/.bashrc or ~/.zshrc
export HNS_LANG="ja"

Supported Languages

Whisper officially supports 57 languages (WER < 50%). Use the corresponding ISO 639-1 code when setting HNS_LANG.

LanguageCodeLanguageCodeLanguageCode
AfrikaansafGermandePersianfa
ArabicarGreekelPolishpl
ArmenianhyHebrewhePortuguesept
AzerbaijaniazHindihiRomanianro
BelarusianbeHungarianhuRussianru
BosnianbsIcelandicisSerbiansr
BulgarianbgIndonesianidSlovaksk
CatalancaItalianitSloveniansl
ChinesezhJapanesejaSpanishes
CroatianhrKannadaknSwahilisw
CzechcsKazakhkkSwedishsv
DanishdaKoreankoTagalogtl
DutchnlLatvianlvTamilta
EnglishenLithuanianltThaith
EstonianetMacedonianmkTurkishtr
FinnishfiMalaymsUkrainianuk
FrenchfrMarathimrUrduur
GalicianglMaorimiVietnamesevi
NepalineWelshcy

Congratulations on customizing your hns setup! Next, explore the use cases to integrate hns into your workflows.