Hello Dan Pham,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Regarding your explanation, you would like to automate the training of a custom speech model through PowerShell.
Absolutely, you can automate the training of a custom speech model using PowerShell with the Azure Speech service. This is an example of steps to take, use the links for more detailed steps and code snippet:
# Set Up Configuration
spx --% config @key --set SpeechSubscriptionKey
spx --% config @region --set SpeechServiceRegion
# Create a Custom Speech Project
spx --% csr project create --name "ProjectName" --language "en-US" --description "Description" --output url "@project.txt"
# Upload Datasets for pronunciation data
spx --% csr dataset upload --name "pronunciation_data" --description "data for pronunciation model" --data .\pronunciation.txt --kind Pronunciation --project "@project.txt" --output url "@dataset.pm.txt"
# For language model adaptation
spx --% csr dataset upload --name "language_model_data" --description "data for language model adaptation" --data .\language_model.txt --kind Language --project "@project.txt" --output url "@dataset.lm.txt"
# For evaluation data
spx --% csr dataset upload --name "test_data_1" --description "Test data for evaluation" --data .\test_data_1.zip --kind Acoustic --project "@project.txt" --output url "@dataset.test1.txt"
# Check Dataset Status
spx --% csr dataset status --dataset "@dataset.pm.txt" --wait
# Train the Custom Model
spx --% csr model train --project "@project.txt" --datasets "@dataset.pm.txt,@dataset.lm.txt" --output url "@model.txt"
# Evaluate the Model
spx --% csr model evaluate --model "@model.txt" --dataset "@dataset.test1.txt" --output url "@evaluation.txt"
These commands help automate the process of creating projects, uploading datasets, training models, and evaluating them https://github.com/Azure/custom-speech-stt/blob/main/automate.md and https://learn.microsoft.com/en-us/azure/ai-services/speech-service/how-to-custom-speech-train-model
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.