[尝试使用自定义型号ID启动自定义语音到文本的容器。但它似乎正在寻找文档中未提及的properties.json。也不确定该位置的默认路径在哪里。
docker run --rm -it -p 5000:5000-内存4g --cpus 4 -v containerpreview.azurecr.io/microsoft/cognitive-services-custom-speech-to-text:latest ApiKey = ... 。ModelId = ....(更新)
========================= ENVIRONMENT VARS ===========================================
EULA: accept
BILLING: https://westus.api.cognitive.microsoft.com/sts/v1.0/issuetoken
APIKEY: ***
========================= ARGUMENT VARS ==============================================
CUSTOM ARGS:
/host /
Starting dotnet Microsoft.CloudAI.Containers.SpeechToText.dll Eula=accept Billing=https://westus.api.cognitive.microsoft.com/sts/v1.0/issuetoken ApiKey=***********************************
Unhandled Exception: System.Exception: Model configuration /usr/local/models/properties.json not found.
at Microsoft.CloudAI.Containers.Common.EnvironmentVariants.IsCustomContainer() in D:\a\1\s\private\SpeechRecognition.Hosts.OnPrem\src\Common\EnvironmentVariants.cs:line 94
at Microsoft.CloudAI.Containers.Startup.ConfigureServices(IServiceCollection services) in D:\a\1\s\private\SpeechRecognition.Hosts.OnPrem\src\Startup.cs:line 105
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Microsoft.CloudAI.Containers.Program.Main(String[] args) in D:\a\1\s\private\SpeechRecognition.Hosts.OnPrem\src\Program.cs:line 24
/run-host: line 75: 23 Aborted (core dumped) "$@"
/run-host: line 82: kill: (23) - No such process
Process start failed for: dotnet Microsoft.CloudAI.Containers.SpeechToText.dll Eula=accept Billing=https://westus.api.cognitive.microsoft.com/sts/v1.0/issuetoken ApiKey=**************************************
/
grep: /usr/local/models/properties.json: No such file or directory
/dpp /
/
自定义容器不包含模型。由于您没有在容器中安装模型文件或未提供要下载的容器的Custom ModelId,因此预期会出现此错误。
[如果您要盛放带有模型的容器,请使用其中的https://docs.microsoft.com/en-us/azure/cognitive-services/containers/container-image-tags#speech-to-text
这里是有关如何使用自定义容器的教程页面(选择“自定义”标签)https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-container-howto?tabs=cstt%2Ccsharp#docker-pull-for-the-speech-containers