Skip to content

Using Hugging Face Models in Software: A Detailed Guide

Hugging Face (huggingface.co) is a popular machine learning model repository that includes a wide range of available speech recognition models. When the built-in Faster-Whisper model lacks support for low-resource languages, or you need a specifically optimized model, Hugging Face is the ideal platform to find a solution.

This feature is available in software version 3.71 and above and only supports models converted by ctranslate2.


Step 1: Confirm Model Compatibility

Before using a Hugging Face model, you must confirm that the model has been converted using ctranslate2. If the model has not been converted by ctranslate2, it cannot be used in the software.

Here are several ways to check:

1. Clear Labeling on the Page

If the model page clearly states "Converted from ctranslate2" or similar wording, the model is compatible.

The image clearly shows it was converted by ctranslate2 As shown in the image, if the page explicitly mentions conversion using ctranslate2, the model is usable.

2. Check Code References

Even if the page doesn't explicitly state it, you can check if the model page includes code snippets related to from faster_whisper. Typically, such models are also compatible. Check if the example code on the model page includes from faster_whisper

3. Examine the config.json File Structure

If the above methods are inconclusive, you can click the Files and versions tab on the model page, then locate and click the config.json file.

Click the file list to view the config.json structure

If the structure of the config.json file resembles the image below, such as containing alignment_heads at the beginning and fields like lang_ids in the middle, the model is usually compatible.

Structure includes alignment_heads and lang_ids, etc.


Step 2: Obtain and Configure the Model ID

Once you confirm the model is compatible, you can add it to the software for use.

1. Obtain the Model ID

The model ID consists of two parts separated by /: username/model-name. For example: zh-plus/faster-whisper-large-v2-japanese-5k-steps.

You can find and click the copy button on the model details page to directly get the model ID, as shown below:

Go to the model details page and click to copy the ID

2. Add the Model ID to the Software

  • Open the software, click Menu -> Tools -> Advanced Options.
  • In the Faster and OpenAI Model List text box, at the end of the existing content, paste the copied model ID using an English comma , to separate it.
  • Click Save to apply the changes.

Paste separated by an English comma


Step 3: Use and Automatically Download the Model

  • Return to the main interface of the software.
  • In the Speech Recognition dropdown, select faster-whisper (local).
  • In the Model dropdown on the right, select the model ID you just added. Select the model ID you just added The software will automatically download the model from the domestic mirror site https://hf-mirror.com, no VPN required.

Important Notes

1. Model Availability Restrictions

The software only supports downloading publicly available models on Hugging Face. For models that require you to agree to terms (such as accepting a license agreement) to download (as shown in the image below) and private models, the software cannot download or use them.

Non-public models cannot be downloaded

2. Use of Domestic Mirror Site

  • When the software interface language is set to Chinese, the software will automatically use the domestic mirror site https://hf-mirror.com for model downloads, avoiding the need for a VPN.
  • If the software interface is in English, it will still attempt to download from the official Hugging Face website, which may require a VPN.
  • You can click Menu -> Tools -> Advanced Options -> Interface Language, enter zh and save, then restart the software to change the interface to Chinese. Enter zh and save, then restart the software to change the interface to Chinese