Skip to content

Commit

Permalink
asr: add model name parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
virajkarandikar committed Jul 17, 2024
1 parent 330aa60 commit a0a8c66
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions riva/client/argparse_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def add_asr_config_argparse_parameters(
help="If specified, text inverse normalization will be applied",
)
parser.add_argument("--language-code", default="en-US", help="Language code of the model to be used.")
parser.add_argument("--model-name", default="", help="Model name to be used.")
parser.add_argument("--boosted-lm-words", action='append', help="Words to boost when decoding.")
parser.add_argument(
"--boosted-lm-score", type=float, default=4.0, help="Value by which to boost words when decoding."
Expand Down
1 change: 1 addition & 0 deletions scripts/asr/riva_streaming_asr_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def streaming_transcription_worker(
config = riva.client.StreamingRecognitionConfig(
config=riva.client.RecognitionConfig(
language_code=args.language_code,
model=args.model_name,
max_alternatives=args.max_alternatives,
profanity_filter=args.profanity_filter,
enable_automatic_punctuation=args.automatic_punctuation,
Expand Down
1 change: 1 addition & 0 deletions scripts/asr/transcribe_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def main() -> None:
config = riva.client.StreamingRecognitionConfig(
config=riva.client.RecognitionConfig(
language_code=args.language_code,
model=args.model_name,
max_alternatives=1,
profanity_filter=args.profanity_filter,
enable_automatic_punctuation=args.automatic_punctuation,
Expand Down
1 change: 1 addition & 0 deletions scripts/asr/transcribe_mic.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def main() -> None:
config=riva.client.RecognitionConfig(
encoding=riva.client.AudioEncoding.LINEAR_PCM,
language_code=args.language_code,
model=args.model_name,
max_alternatives=1,
profanity_filter=args.profanity_filter,
enable_automatic_punctuation=args.automatic_punctuation,
Expand Down

0 comments on commit a0a8c66

Please sign in to comment.