How to get blendshapes from SSML

Dexin Huang 5 Reputation points
2023-01-24T02:43:05.5966667+00:00

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='http://www.w3.org/2001/10/synthesis' xmlns:mstts='http://www.w3.org/2001/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
    2023-01-30T14:29:43.2633333+00:00

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

    0 comments No comments