Skip to content

Add KokoroTTS support for voice agent framework#14910

Merged
stevehuang52 merged 14 commits intomainfrom
tango4j/add_kokoro_to_va
Oct 10, 2025
Merged

Add KokoroTTS support for voice agent framework#14910
stevehuang52 merged 14 commits intomainfrom
tango4j/add_kokoro_to_va

Conversation

@tango4j
Copy link
Copy Markdown
Collaborator

@tango4j tango4j commented Oct 9, 2025

What does this PR do ?

This PR adds kokoro TTS support and configurations to NeMo Voice Agent framework.

Collection: [Note which collection this PR will affect]

voice agent

Changelog

See
nemo/agents/voice_agent/pipecat/services/nemo/tts.py
for core changes

Usage

  • You can potentially add a usage example below
python3 <NEMO>/examples/voice_agent/server/bot_websocket_server.py

GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you add or update any necessary documentation?
  • Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
    • Reviewer: Does the PR have correct import guards for all optional libraries?

PR Type:

  • New Feature
  • Bugfix
  • Documentation

If you haven't finished some of the above items you can still open "Draft" PR.

Who can review?

Anyone in NeMo ASR.

Additional Information

  • Related to # (issue)

tango4j and others added 3 commits October 9, 2025 12:17
Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: tango4j <tango4j@users.noreply.github.com>
@tango4j tango4j requested a review from stevehuang52 October 9, 2025 20:06
Signed-off-by: taejinp <tango4j@gmail.com>
Signed-off-by: taejinp <tango4j@gmail.com>
@tango4j tango4j added Run CICD and removed Run CICD labels Oct 9, 2025
Signed-off-by: tango4j <tango4j@users.noreply.github.com>

Args:
lang_code: Language code for the model (default: 'a' for American English)
voice: Voice to use (default: 'af_heart')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we list more voice options in the comments?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

af_heart, af_bella, am_fenrir am_michael

are recommend

Check out
https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md


def __init__(
self,
lang_code: str = "a",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the language code from Kokoro is every different from the ones used in other components (ASR/LLM/TTS), where "en-us" would be used for "American english". Maybe it's better to create a mapping from the ISO standard to the ones used by kokoro?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case for the future, here is the mapping table:

emoji,letter,language,ietf_code
🇺🇸,a,American English,en-US
🇬🇧,b,British English,en-GB
🇪🇸,e,Spanish,es-ES
🇫🇷,f,French (France),fr-FR
🇮🇳,h,Hindi,hi-IN
🇮🇹,i,Italian,it-IT
🇯🇵,j,Japanese,ja-JP
🇧🇷,p,Brazilian Portuguese,pt-BR
🇨🇳,z,Mandarin Chinese,zh-CN

Signed-off-by: stevehuang52 <heh@nvidia.com>
Signed-off-by: stevehuang52 <heh@nvidia.com>
Signed-off-by: stevehuang52 <heh@nvidia.com>
Signed-off-by: stevehuang52 <heh@nvidia.com>
Signed-off-by: stevehuang52 <heh@nvidia.com>
Signed-off-by: stevehuang52 <heh@nvidia.com>
@tango4j tango4j self-assigned this Oct 10, 2025
@tango4j tango4j added Run CICD and removed Run CICD labels Oct 10, 2025
@github-actions github-actions bot removed the Run CICD label Oct 10, 2025
@github-actions
Copy link
Copy Markdown
Contributor

[🤖]: Hi @tango4j 👋,

We wanted to let you know that a CICD pipeline for this PR just finished successfully.

So it might be time to merge this PR or get some approvals.

//cc @chtruong814 @ko3n1g @pablo-garay @thomasdhc

Copy link
Copy Markdown
Collaborator

@stevehuang52 stevehuang52 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks~!

@stevehuang52 stevehuang52 merged commit bd808fd into main Oct 10, 2025
64 of 70 checks passed
@stevehuang52 stevehuang52 deleted the tango4j/add_kokoro_to_va branch October 10, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants