
canary-0.6b-turbo-asr
DeprecatedDownloadableMulti-lingual model supporting speech-to-text recognition and translation.
Getting Started
Riva uses gRPC APIs. Instructions below demonstrate usage of canary-0-6b-turbo-asr model using Python gRPC client.
Prerequisites
You will need a system with Git and Python 3+ installed.
Install Riva Python Client
pip install nvidia-riva-client
Download Python Client
Download Python client code by cloning Python Client Repository.
git clone https://github.com/nvidia-riva/python-clients.git
Run Python Client
Open a command terminal and execute below command to transcribe audio. Make sure you have a speech file in 16-bit Mono format in WAV/OGG/OPUS container. If you have generated the API key, it will be auto-populated in the command.
Below command demonstrates transcription of English audio file.
python python-clients/scripts/asr/transcribe_file_offline.py \
--server grpc.nvcf.nvidia.com:443 --use-ssl \
--metadata function-id "c367545c-964a-42b1-b16f-40c262ae3646" \
--metadata "authorization" "Bearer $NVIDIA_API_KEY" \
--language-code en-US \
--input-file <path_to_audio_file>
Below command demonstrates translation from English audio to Hindi.
python python-clients/scripts/asr/transcribe_file_offline.py \
--server grpc.nvcf.nvidia.com:443 --use-ssl \
--metadata function-id "c367545c-964a-42b1-b16f-40c262ae3646" \
--metadata "authorization" "Bearer $NVIDIA_API_KEY" \
--language-code en-US \
--custom-configuration "target_language:hi-IN,task:translate" \
--input-file <path_to_audio_file>
One can transcribe and translate supported languages by changing the source language via --language-code and target language via target_language parameter.
Support for gRPC clients in other programming languages
Riva uses gRPC APIs. Proto files can be downloaded from Riva gRPC Proto files and compiled to target language using Protoc compiler. Example Riva clients in C++ and Python languages are provided below.