Learn how to create and apply a custom language model in the console.
Prerequisites
You have activated the Intelligent Speech Interaction service. For more information, see Activate Service.
Training corpus
Limitations
-
This feature is available free of charge to all users of the free and commercial editions of Intelligent Speech Interaction.
-
The training corpus must contain domain-specific text. The closer the corpus is to the audio you want to recognize, the better the optimization results.
-
The corpus must be saved as a plain text file encoded in
UTF-8 (without BOM). The file size cannot exceed 10 MB. -
Each user can create up to 10 models.
-
Each sentence or keyword that you want to emphasize must be on a separate line. Each line must contain no more than 500 characters.
-
Numbers in the text must be spelled out based on their pronunciation. For example, "58.9" should be converted to "fifty-eight point nine".
-
The file must contain at least one sentence (a line with more than four words).
-
Use only commas (,), periods (.), question marks (?), and exclamation points (!). End each sentence with a punctuation mark. Remove punctuation such as book title marks (<>) and double quotation marks ("").
Optimization tips
If a keyword is recognized inaccurately, improve its recognition by repeating the sentence that contains it, or the keyword itself on a separate line, multiple times (for example, 10 times). If the result is still not satisfactory, increase the number of repetitions.
-
Before you adjust the training corpus, make sure that the inaccurate keyword recognition is not caused by unclear pronunciation or poor audio quality.
-
Test and refine your model to identify errors. Prepare your training corpus carefully to prevent misrecognition of other words that have similar pronunciations.
Procedure
-
Log in to the Intelligent Speech Interaction console.
-
In the left-side navigation pane, choose Self-learning Platform > Language Model Customization.
-
If this is your first time using the feature, click Activate for Free on the page, and then click OK in the dialog box that appears. This activates the Language Model Customization service.
-
Create a model.
-
On the Language Model Customization page, on the Model tab, click Create Model.
-
In the Create Model panel, enter a name for your custom model.
ImportantThe name must be unique among your custom models.
-
Select a base model that matches your business requirements. The custom model is trained using the selected base model.
In the Create Model dialog box, after entering a Custom Model Name (for example, test1204), select a base model that matches your scenario. Available models include: Mandarin Chinese (Shi Yin Shi V1 - end-to-end model, 16K), Chinese and English free speech (Mandarin Chinese, 16K), Education Live Streaming (English, 16K), and Education Content Analysis (Mandarin Chinese, 16K). After you complete the selection, click Next to go to the corpus upload step.
-
Click Next.
-
Upload the training corpus.
You can choose Upload Dataset or Select Existing Dataset (available if you have used custom models before). Then click OK.
The training corpus file must be a
.txtfile with UTF-8 encoding. The file size cannot exceed 10 MB.After the training corpus is uploaded, your new model appears in the model list. The model status is Not Trained.
-
-
In the Actions column for the model, click Train Model.
The training process may take some time. After the training is complete, the model status automatically changes to Deployed.
-
In the Actions column for the model, click Automated Test to create an automated test task. For more information, see automated test.
-
Apply the model. Once the model status is Deployed, you can apply it to your projects.
-
In the left-side navigation pane, choose All Projects. On the My Projects page, click Project Feature Configuration in the Actions column of the target project.
-
Under Speech Recognition (ASR), click Modify Configuration, select a speech recognition model, and then click Confirm. After you enter the Project Feature Configuration page, the main area displays Please select a speech recognition model. On the left, you can filter models by scenario category (such as General, Education, or Medical) and language (such as Chinese languages or Multiple languages). The right side provides a test panel where you can use a microphone or an audio file. After you select a model, click Confirm at the bottom to complete the configuration.
-
On the project configuration page, in the Self-learning section, select your custom model and click Apply.
NoteThe base model that you selected during language model customization must match the speech recognition model currently configured for the project. Otherwise, your custom model will not appear in the drop-down list.
-