Skip to content

Commit

Permalink
add an api to get phoneme names.
Browse files Browse the repository at this point in the history
  • Loading branch information
hecomi committed Jan 5, 2023
1 parent 714e72d commit bbb7442
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Assets/uLipSync/Runtime/Core/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Unity.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace uLipSync
{
Expand Down Expand Up @@ -193,6 +194,11 @@ public void Import(string path)
JsonUtility.FromJsonOverwrite(json, this);
}

public string[] GetPhonemeNames()
{
return mfccs.Select(x => x.name).Distinct().ToArray();
}

public static Profile Create(string path)
{
var profile = new Profile();
Expand Down

0 comments on commit bbb7442

Please sign in to comment.