Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ services:
- RIVA_API_KEY=${RIVA_API_KEY}
- RIVA_API_NGC_ORG=${RIVA_API_NGC_ORG:-openmind-1}
- RIVA_EULA=${RIVA_EULA:-accept}
- BOOSTED_LM_WORDS=${BOOSTED_LM_WORDS:-Tensor}
- GLOG_minloglevel=2

volumes:
Expand Down
37 changes: 26 additions & 11 deletions src/om1_speech/riva/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: MIT

import argparse
import os
from pathlib import Path


Expand Down Expand Up @@ -75,20 +76,34 @@ def add_asr_config_argparse_parameters(
help="Language code of the model to be used.",
)
parser.add_argument("--model-name", default="", help="Model name to be used.")

default_boosted_words = [
"OpenMind",
"Bits",
"Bytes",
"Pixel",
"hello",
"GTC",
"Unitree",
"robot",
"NVIDIA",
]

env_boosted_words = os.getenv("BOOSTED_LM_WORDS", "")
if env_boosted_words:
additional_words = [
word.strip() for word in env_boosted_words.split(",") if word.strip()
]
unique_words = [
word for word in additional_words if word not in default_boosted_words
]
default_boosted_words.extend(unique_words)

parser.add_argument(
"--boosted-lm-words",
action="append",
default=[
"OpenMind",
"Bits",
"hello",
"GTC",
"Unitree",
"robot",
"OM1",
"NVIDIA",
],
help="Words to boost when decoding. Can be used multiple times to boost multiple words.",
default=default_boosted_words,
help="Words to boost when decoding. Can be used multiple times to boost multiple words. Can also be set via BOOSTED_LM_WORDS environment variable (comma-separated).",
)
parser.add_argument(
"--boosted-lm-score",
Expand Down
Loading