nvidia-riva / tutorials

NVIDIA Riva runnable tutorials
114 stars 46 forks source link

Unavailable model requested. Lang: en-US #78

Closed UserName-wang closed 1 year ago

UserName-wang commented 1 year ago

riva_target_gpu_family="tegra"

Legacy arm64 platform to be enabled. Supported legacy platforms: xavier

riva_arm64_legacy_platform="xavier"

Enable or Disable Riva Services

service_enabled_asr=true service_enabled_nlp=false service_enabled_tts=false

just started the riva server via: bash riva_init.sh bash riva_start.sh

then tried the command: riva_streaming_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav { "name": "_InactiveRpcError", "message": "<_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.INVALID_ARGUMENT\n\tdetails = \"Error: Unavailable model requested. Lang: en-US, Type: offline\"\n\tdebug_error_string = \"UNKNOWN:Error received from peer ipv6:%5B::1%5D:50051 {grpc_message:\"Error: Unavailable model requested. Lang: en-US, Type: offline\", grpc_status:3, created_time:\"2022-10-12T13:47:30.950278184+08:00\"}\"\n>", "stack": "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31m_InactiveRpcError\u001b[0m Traceback (most recent call last)\nCell \u001b[0;32mIn [5], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[43mriva_asr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43moffline_recognize\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcontent\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 2\u001b[0m asr_best_transcript \u001b[38;5;241m=\u001b[39m response\u001b[38;5;241m.\u001b[39mresults[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39malternatives[\u001b[38;5;241m0\u001b[39m]\u001b[38;5;241m.\u001b[39mtranscript\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mASR Transcript:\u001b[39m\u001b[38;5;124m\"\u001b[39m, asr_best_transcript)\n\nFile \u001b[0;32m~/study/python/nemo/.nemo/lib/python3.8/site-packages/riva/client/asr.py:352\u001b[0m, in \u001b[0;36mASRService.offline_recognize\u001b[0;34m(self, audio_bytes, config, future)\u001b[0m\n\u001b[1;32m 350\u001b[0m request \u001b[39m=\u001b[39m rasr\u001b[39m.\u001b[39mRecognizeRequest(config\u001b[39m=\u001b[39mconfig, audio\u001b[39m=\u001b[39maudio_bytes)\n\u001b[1;32m 351\u001b[0m func \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mstub\u001b[39m.\u001b[39mRecognize\u001b[39m.\u001b[39mfuture \u001b[39mif\u001b[39;00m future \u001b[39melse\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mstub\u001b[39m.\u001b[39mRecognize\n\u001b[0;32m--> 352\u001b[0m \u001b[39mreturn\u001b[39;00m func(request, metadata\u001b[39m=\u001b[39;49m\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mauth\u001b[39m.\u001b[39;49mget_auth_metadata())\n\nFile \u001b[0;32m~/study/python/nemo/.nemo/lib/python3.8/site-packages/grpc/_channel.py:946\u001b[0m, in \u001b[0;36m_UnaryUnaryMultiCallable.call\u001b[0;34m(self, request, timeout, metadata, credentials, wait_for_ready, compression)\u001b[0m\n\u001b[1;32m 937\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcall\u001b[39m(\u001b[39mself\u001b[39m,\n\u001b[1;32m 938\u001b[0m request,\n\u001b[1;32m 939\u001b[0m timeout\u001b[39m=\u001b[39m\u001b[39mNone\u001b[39;00m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 942\u001b[0m wait_for_ready\u001b[39m=\u001b[39m\u001b[39mNone\u001b[39;00m,\n\u001b[1;32m 943\u001b[0m compression\u001b[39m=\u001b[39m\u001b[39mNone\u001b[39;00m):\n\u001b[1;32m 944\u001b[0m state, call, \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_blocking(request, timeout, metadata, credentials,\n\u001b[1;32m 945\u001b[0m wait_for_ready, compression)\n\u001b[0;32m--> 946\u001b[0m \u001b[39mreturn\u001b[39;00m _end_unary_response_blocking(state, call, \u001b[39mFalse\u001b[39;49;00m, \u001b[39mNone\u001b[39;49;00m)\n\nFile \u001b[0;32m~/study/python/nemo/.nemo/lib/python3.8/site-packages/grpc/_channel.py:849\u001b[0m, in \u001b[0;36m_end_unary_response_blocking\u001b[0;34m(state, call, with_call, deadline)\u001b[0m\n\u001b[1;32m 847\u001b[0m \u001b[39mreturn\u001b[39;00m state\u001b[39m.\u001b[39mresponse\n\u001b[1;32m 848\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[0;32m--> 849\u001b[0m \u001b[39mraise\u001b[39;00m _InactiveRpcError(state)\n\n\u001b[0;31m_InactiveRpcError\u001b[0m: <_InactiveRpcError of RPC that terminated with:\n\tstatus = StatusCode.INVALID_ARGUMENT\n\tdetails = \"Error: Unavailable model requested. Lang: en-US, Type: offline\"\n\tdebug_error_string = \"UNKNOWN:Error received from peer ipv6:%5B::1%5D:50051 {grpc_message:\"Error: Unavailable model requested. Lang: en-US, Type: offline\", grpc_status:3, created_time:\"2022-10-12T13:47:30.950278184+08:00\"}\"\n>" }

UserName-wang commented 1 year ago

riva_streaming_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav. above command can execute successfully as expected.

messiaen commented 1 year ago

@UserName-wang Could you post the server logs?

UserName-wang commented 1 year ago

Hi! Here are the log information:

riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav, then I got a error message: I1013 11:35:04.023735 23 grpc_server.cc:4544] Started GRPCInferenceService at 0.0.0.0:8001 I1013 11:35:04.028112 23 http_server.cc:3242] Started HTTPService at 0.0.0.0:8000 I1013 11:35:04.135290 23 http_server.cc:180] Started Metrics Service at 0.0.0.0:8002 Waiting for Riva server to load all models…retrying in 10 seconds Waiting for Riva server to load all models…retrying in 10 seconds Riva server is ready… Use this container terminal to run applications: @.***:/opt/riva# riva_asr_client --audio_file=/opt/riva/wav/en-US_sample.wav I1013 11:36:34.613380 195 riva_asr_client.cc:445] Using Insecure Server Credentials Loading eval dataset… filename: /opt/riva/wav/en-US_sample.wav Done loading 1 files RPC failed: Error: Unavailable model requested. Lang: en-US, Type: offline Done processing 1 responses Some requests failed to complete properly, not printing performance stats The key parameters I set in config.sh: riva_target_gpu_family=“tegra” riva_arm64_legacy_platform=“xavier” service_enabled_asr=true service_enabled_nlp=false service_enabled_tts=false language_code=(“en-US”) , if I change to language_code=(“en-US” “zh-CN”), then bash riva_start.sh cannot start. asr_acoustic_model=(“conformer”) MODEL_DEPLOY_KEY=“tlt_encode” Can you please help to figure out why?

Thank you!

在 2022年10月13日,22:49,Greg Clark @.***> 写道:

 @UserName-wang Could you post the server logs?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

messiaen commented 1 year ago

Sorry, I was unclear. After you've run the commands above in the docker container. In another terminal outside of docker could you run docker logs riva-speech and post the results. That will show log from the triton server startup and any errors on the triton server side.

UserName-wang commented 1 year ago

Sorry, I was unclear. After you've run the commands above in the docker container. In another terminal outside of docker could you run docker logs riva-speech and post the results. That will show log from the triton server startup and any errors on the triton server side. Dear messiaen, thank you for your reply! Here are the output after command docker logs riva-speech . I noticed there is a error said No API key provided. Stats reporting disabled. but the API was set in the config.sh: RIVA_API_KEY= . sometimes I if try riva_init.sh fist time it will report same error. but if I try one more time then it will not report the same API key error. I don't know whats' the root cause.

_docker logs riva-speech I1015 00:59:31.669229 20 riva_server.cc:120] Using Insecure Server Credentials E1015 00:59:31.690685 20 model_registry.cc:236] error: unable to get server status: failed to connect to all addresses E1015 00:59:41.691197 20 model_registry.cc:236] error: unable to get server status: failed to connect to all addresses E1015 00:59:51.692873 20 model_registry.cc:236] error: unable to get server status: failed to connect to all addresses E1015 01:00:01.705184 20 model_registry.cc:236] error: unable to get server status: failed to connect to all addresses E1015 01:00:11.707944 20 model_registry.cc:236] error: unable to get server status: failed to connect to all addresses E1015 01:00:21.712430 20 model_registry.cc:236] error: unable to get server status: failed to connect to all addresses I1015 01:00:31.746588 20 model_registry.cc:110] Successfully registered: conformer-en-US-asr-streaming for ASR I1015 01:00:32.005506 20 model_registry.cc:110] Successfully registered: riva-punctuation-en-US for NLP I1015 01:00:32.030455 20 model_registry.cc:110] Successfully registered: riva_intent_misty for NLP I1015 01:00:32.853778 20 model_registry.cc:110] Successfully registered: riva-punctuation-en-US for NLP I1015 01:00:32.875689 20 model_registry.cc:110] Successfully registered: riva_intent_misty for NLP I1015 01:00:32.930292 20 model_registry.cc:110] Successfully registered: fastpitch_hifigan_ensemble-English-US for TTS I1015 01:00:32.992630 20 riva_server.cc:160] Riva Conversational AI Server listening on 0.0.0.0:50051 W1015 01:00:32.992906 20 stats_reporter.cc:41] No API key provided. Stats reporting disabled. I1015 02:24:12.830221 225 grpc_riva_asr.cc:484] ASRService.Recognize called. I1015 02:24:12.831468 225 riva_asr_stream.cc:214] Detected format: encoding = 1 numchannels = 1 samplerate = 16000 bitspersample = 16 I1015 02:24:12.831526 225 grpc_riva_asr.cc:550] ASRService.Recognize performing streaming recognition with sequence id: 1464981607 E1015 02:24:12.831753 225 grpc_rivaasr.cc:407] Error: Unavailable model requested. Lang: en-US, Type: offline

virajkarandikar commented 1 year ago

@UserName-wang As shown in your log, you have deployed only the streaming model.

I1015 01:00:31.746588 20 model_registry.cc:110] Successfully registered: conformer-en-US-asr-streaming for ASR

You can enable offline model in config.sh, redeploy and restart the server by running riva_stop.sh, riva_init.sh, riva_start.sh sequentially. Then run the client command.

virajkarandikar commented 1 year ago

Closing issue due to lack of activity. Please re-open the issue if you would like to follow up with this issue.