Skip to content

Conversation

@HeadHunter4621
Copy link

Toki Pona phonemization is done under Romanize, I don't know how else to do it.

Copilot AI review requested due to automatic review settings December 30, 2025 09:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for the Toki Pona language to OpenUtau's DiffSinger phonemizer system. Since Toki Pona uses the Latin alphabet natively, no romanization logic is required.

Key Changes:

  • Added a new DiffSinger phonemizer specifically for Toki Pona language
  • Registered "Toki Pona" (tp) in the language strings resource file

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
OpenUtau/Strings/Strings.axaml Added "Toki Pona" language entry with key "languages.tp" in correct alphabetical position
OpenUtau.Core/DiffSinger/Phonemizers/DiffSingerTokiPonaPhonemizer.cs New phonemizer class for Toki Pona that inherits from DiffSingerBasePhonemizer with appropriate language code and dictionary configuration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +2 to +14
using System.Linq;
using OpenUtau.Api;

namespace OpenUtau.Core.DiffSinger {
[Phonemizer("DiffSinger Toki Pona Phonemizer", "DIFFS TP", language: "TP")]
public class DiffSingerTokiPonaPhonemizer : DiffSingerBasePhonemizer {
protected override string GetDictionaryName() => "dsdict-tp.yaml";

public override string GetLangCode() => "tp";

protected override string[] Romanize(IEnumerable<string> lyrics) {
var lyricsArray = lyrics.ToArray();
return lyricsArray;
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The using System.Linq; import and the Romanize method override are unnecessary. The base class MachineLearningPhonemizer already provides a default Romanize implementation that returns lyrics.ToArray(), which is identical to what this override does. Since Toki Pona uses the Latin alphabet and doesn't require romanization, the default implementation is sufficient. Consider removing both the import and the method override to reduce code duplication.

Copilot uses AI. Check for mistakes.
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.

1 participant