CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Real-time mouth motion control using plug-in components
This section explains how to use the CRIWARE Unity Plug-in, and the ADX LipSync extension plug-in, to obtain a mouth pattern in real time from the played sound, which is then reflected it in the model.

Import Plug-ins

Import the following plug-ins for projects that have already been imported
the CRIWARE Unity Plug-in.

  * cri

  \ * expansion

    \ * cri_adx_lipsync

      \ * unity

        \ * plugin

          o * cri_adxlipsync_unity_plugin_vX_XX_XX_[Platform].unitypackage(AssemblyDefinition

          \ * obsolete

            \ * cri_adxlipsync_unity_plugin_vX_XX_XX_[Platform].unitypackage(Conventional

 

 

 

 

 

support plugin)

 

plugin)

 

Using plugin components

By using these components, you can easily perform lip-sync operations.
Please refer to the following pages for the details about each component.

SDK Precautions when updating

Attention
When updating from SDK Ver3.05.xx to SDK Ver3.06.00
CriWare.CriLipsDeformer -based components have been added in order to replace CriWare.CriLipsShape -based components.
The following features have been added to the new CriWare.CriLipsDeformer -based components:
  • Simplified AddComponent and reset of running morphing targets
  • You can customize the morphing process by inheriting the CriWare.ICriLipsMorph interface.
CriWare.CriLipsShape components are now deprecated.
(Except for some earlier versions of Unity where CriWare.CriLipsDeformer cannot function properly)
All the features provided by the CriWare.CriLipsShape components are also available in the CriWare.CriLipsDeformer components.

Attention
When updating from SDK Ver3.00.xx to SDK Ver3.01.00
The properties of the BlendShapeNameMapping structure within the CriLipsMeshMorph class have changed.
Due to this specification change, if you reopen a scene after updating the plug-in, any previous blend shape mapping will be reset.
Please map the blend shapes again after updating the plug-in.

If this implies many changes, please try to open the Unity scene file with a text editor and edit the description of the updated mapping as follows.

exp4u_adxlipsync_namemapping_diff.png
Remove widthHeightName, japaneseAIUEOName and re-align indents

If you don't use plugin components

if this feature is used by directly attaching it to a CriAtomExPlayer instead of using components,
the mouth shape information can be obtained using a script as follows.
/* Creation of Atom-linked mouth shape analysis module */
CriLipsAtomAnalyzer criLipsAtomAnalyzer = new CriLipsAtomAnalyzer();
/* Set the sampling rate of the audio to be played */
criLipsAtomAnalyzer.SetSamplingRate(48000);
/* Attach to CriAtomExPlayer */
criLipsAtomAnalyzer.AttachToAtomExPlayer(criAtomExPlayer);
...
/* Mouth shape information is acquired during audio playback by Attached criAtomExPlayer */
criLipsAtomAnalyzer.GetInfo(out info);
criLipsAtomAnalyzer.GetMorphTargetBlendAmountAsJapanese(out morphTargetBlendAmountAsJapanese);

If there are multiple sampling rates for the audio to be played,
you can also obtain the sampling rate at the time of execution as follows:
/* Voice waveform information structure */
CriAtomEx.WaveformInfo waveformInfo;
/* Obtain Cue waveform information by specifying the Cue name to be played from the acb handle. */
atomExAcb.GetWaveFormInfo(cueName, out waveformInfo);
/* Set the sampling rate to the Atom-linked mouth shape analysis module from the acquired waveform information */
criLipsAtomAnalyzer.SetSamplingRate(waveformInfo.samplingRate);