How to get blendshapes from SSML

Dexin Huang 5 Reputation points

I am using the following code, however, I cannot retrieve the JSON string that is supposed to be able to drive blendshapes.

private System.Collections.IEnumerator SpeakAsync(string response){    var startTime = DateTime.Now;    var speechSynthesisVoiceName  = "en-US"+"-"+voice+"Neural";

var ssml = @$"<speak version='1.0' xml:lang='en-US' xmlns='' xmlns:mstts=''>    <voice name='{speechSynthesisVoiceName}'>        <mstts:viseme type='FacialExpression'/>        {response}    </voice></speak>";

synthesizer.VisemeReceived += (s, e) =>{    Debug.Log($"Viseme event received. Audio offset: " +                      $"{e.AudioOffset / 10000}ms, viseme id: {e.VisemeId}.{e.Animation}");    // `Animation` is an xml string for SVG or a json string for blend shapes    var animation = e.Animation;    blendShapeDictionary = JsonUtility.FromJson<Dictionary<string, float>>(animation);        
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,223 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,361 Reputation points Microsoft Employee

    Adding reference to the SDK issue as answer to help other members of the community. Thanks!!

    0 comments No comments