File size: 4,306 Bytes
a7c2243 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | # This is an example config for setting up a NeMo Voice Agent server.
# Please refer to https://github.com/NVIDIA-NeMo/NeMo/tree/main/examples/voice_agent/README.md for more details
# STT, LLM and TTS models have standalone configs in the folder "server/server_configs/{stt,llm,tts}_configs".
# Specify the type and an a model identifier to automatically configure the model.
transport:
audio_out_10ms_chunks: 10 # use 4 as websocket default, but increasing to a larger number might have less glitches in TTS output
record_audio_data: false
audio_log_dir: "./audio_logs"
vad:
type: silero
confidence: 0.6 # VAD threshold for detecting speech versus non-speech
start_secs: 0.1 # min amount of speech to trigger UserStartSpeaking
stop_secs: 1.2 # min amount of silence to trigger UserStopSpeaking
min_volume: 0.4 # Microphone volumn threshold for VAD
stt:
type: nemo # choices in ['nemo'] currently only NeMo is supported
model: "nvidia/parakeet_realtime_eou_120m-v1"
# model: "nvidia/nemotron-speech-streaming-en-0.6b"
model_config: "./server_configs/stt_configs/nemo_cache_aware_streaming.yaml"
device: "cuda"
diar:
type: nemo
enabled: true # set to false to disable
model: "nvidia/diar_streaming_sortformer_4spk-v2.1"
device: "cuda"
threshold: 0.4 # threshold value used to determine if a speaker exists or not, setting it to a lower value will increaset the sensitivity of the model
frame_len_in_secs: 0.08 # default for Sortformer, do not change unless using other architechtures
turn_taking:
backchannel_phrases_path: "./server/backchannel_phrases.yaml" # set it to the actual path of the file, or specify a list of backchannel phrases here
max_buffer_size: 2 # num of words more than this amount will interrupt the LLM immediately if not backchannel phrases
bot_stop_delay: 0.5 # a delay in seconds allowed between server and client audio output, so that the BotStopSpeaking signal is handled not too far away from the actual time that the user hears all audio output
llm:
type: auto # choices in ['auto', 'hf', 'vllm'], if `auto`, it will try to use vllm and fall back to hf if vllm not available
model: "nvidia/NVIDIA-Nemotron-Nano-9B-v2" # model name for HF models, will be used via `AutoModelForCausalLM.from_pretrained()`
model_config: "./server_configs/llm_configs/nemotron_nano_v2.yaml"
# model: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16"
# model_config: "./server_configs/llm_configs/nemotron_nano_v3.yaml"
# if `model_config` is not specified, and the llm.model is not in model_registry.yaml, it will use `llm_configs/hf_llm_generic.yaml`
# model: "Qwen/Qwen2.5-7B-Instruct"
# model_config: "./server_configs/llm_configs/qwen2.5-7B.yaml"
# model: "Qwen/Qwen3-8B"
# model_config: "./server_configs/llm_configs/qwen3-8B.yaml"
# model: meta-llama/Llama-3.1-8B-Instruct
device: "cuda"
enable_reasoning: false # it's best to turn-off reasoning for lowest latency, setting it to True will use the same config ending with `_think.yaml` instead
# `system_prompt` is used as the sytem prompt to the LLM, please refer to differnt LLM webpage for spcial functions like enabling/disabling thinking
# system_prompt: /path/to/prompt.txt # or use path to a txt file that contains a long prompt, for example in `../example_prompts/fast_bite.txt`
system_prompt: "You are a helpful AI agent named Lisa. Start by greeting the user with 'Hi, I'm Lisa, your helpful AI assistant. How can I help you today?'. Keep your responses concise and conversational since they will be spoken aloud. Avoid special characters. Use only simple, plain text sentences. Always punctuate your responses using standard sentence punctuation: commas, periods, question marks, exclamation points, etc. Always spell out numbers as words. You might also see speaker tags (<speaker_0>, <speaker_1>, etc.) in the user context. You should respond to the user based on the speaker tag and the context of that speaker. Do not include the speaker tags in your response, use them only to identify the speaker. Avoid using emoji in your response."
tts:
type: nemo
model: "kokoro"
model_config: "./server_configs/tts_configs/kokoro_82M.yaml"
device: "cuda"
ignore_strings: # strings/characters to ignore in TTS
- "*"
- "<unk>"
|