SALSA LipSync Logo

Classes, Methods, & Properties



SalsaStatus

This class is passed as a parameter by the [Salsa_OnTalkStatusChanged] event.

Public properties

SalsaStatus.instance (object)

A reference to the Salsa class instance of the broadcast sender.

SalsaStatus.isTalking (bool)

A Boolean value that represents the talk status of the broadcast sender.

SalsaStatus.talkerName (string)

The GameObject name of the broadcast sender.

SalsaStatus.clipName (string)

The name of the audio clip that is currently linked.


Salsa2D

This class provides lip sync approximation for 2D characters using sprite-based mouth expression: sayRest, saySmall, sayMedium, sayLarge. Available from:

  • [Component] → [Crazy Minnow Studio] → [Salsa2D] menu
  • or from the Inspector, under [Add Component]  → [Crazy Minnow Studio] → [Salsa2D]

Public functions

Salsa2D.Play()

Plays the attached audio file and lip sync approximation during runtime.

Salsa2D.Pause()

Pauses the audio file and lip sync approximation during runtime.

Salsa2D.Stop()

Stops the audio file and lip sync approximation during runtime.

Salsa2D.SetAudioClip(AudioClip)

Assign a new audio clip during runtime.

Salsa2D.LoadAudioClip(string)

Load a new audio clip during runtime from a [Resources] folder. (file name without extenstion.

Salsa2D.SetOrderInLayer(int)

Set the [Order in Layer] property during runtime.

Public properties

Salsa2D.say (string)

String value that is always updated with the current shape (Rest, Small, Medium, Large). This is useful for asset integrators that want to use Salsa2D as a lip sync engine with their own integration.

Salsa2D.sayIndex (int)

Int value that is always updated with the current shape (0=Rest, 1=Small, 2=Medium, 3=Large). This is useful for asset integrators that want to use Salsa2D as a lip sync engine with their own integration.

Salsa2D.isTalking (bool)

Check this boolean value to determine when the audio file has stopped playing

Broadcast Event

Add this event to any script attached to any of your [Broadcast Receivers], or their children if you have [Propogate To Children] checked in the Inspector, to determine who has started or stopped talking. Use this instead of Salsa2D.isTalking for event-based implementations.

C#:
void Salsa_OnTalkStatusChanged(SalsaStatus status)
{
	Debug.Log("Salsa_OnTalkStatusChanged:" +
		" instance(" + status.instance.GetType() + ")," +
		" talkerName(" + status.talkerName + ")," + 
		((status.isTalking) ? "started" : "finished") + " saying " + status.clipName);
}
JavaScript:
function Salsa_OnTalkStatusChanged(status : SalsaStatus) {
	Debug.Log("Salsa_OnTalkStatusChanged:" +
		" instance(" + status.instance.GetType() + ")," +
		" talkerName(" + status.talkerName + ")," + 
		((status.isTalking) ? "started" : "finished") + " saying " + status.clipName);
}

 


Salsa3D

This class provides lip sync approximation for 3D characters using BlendShape mouth expression: sayRest, saySmall, sayMedium, sayLarge. Available from:

  • [Component] → [Crazy Minnow Studio] → [Salsa3D] menu
  • or from the Inspector, under [Add Component]  → [Crazy Minnow Studio] → [Salsa3D]

Public functions

Salsa3D.Play()

Plays the attached audio file and lip sync approximation during runtime.

Salsa3D.Pause()

Pauses the audio file and lip sync approximation during runtime.

Salsa3D.Stop()

Stops the audio file and lip sync approximation during runtime.

Salsa3D.SetAudioClip(AudioClip)

Assign a new audio clip during runtime.

Salsa3D.LoadAudioClip(string)

Load a new audio clip during runtime from a [Resources] folder. (file name without extenstion.

Salsa3D.SetRangeOfMotion(float)

Set the BlendShape range of motion percentage from 0-100.

Public properties

Salsa3D.say (string)

String value that is always updated with the current shape (Rest, Small, Medium, Large). This is useful for asset integrators that want to use Salsa3D as a lip sync engine with their own integration.

Salsa3D.sayIndex (int)

Int value that is always updated with the current shape (0=Rest, 1=Small, 2=Medium, 3=Large). This is useful for asset integrators that want to use Salsa3D as a lip sync engine with their own integration.

Salsa3D.sayAmount (SalsaBlendAmounts)

  • Salsa3D.sayAmount.saySmall (float)
  • Salsa3D.sayAmount.sayMedium (float)
  • Salsa3D.sayAmount.sayLarge (float)

A custom type that contains the say BlendShape amounts. It's updated in realtime and provides direct access to the values even when no SkinnedMeshRenderer is linked. This is useful for asset integrators that want to use Salsa3D as a lip sync engine with their own integration.

Salsa3D.isTalking (bool)

Check this boolean value to determine when the audio file has stopped playing

Broadcast Event

Add this event to any script attached to any of your [Broadcast Receivers], or their children if you have [Propogate To Children] checked in the Inspector, to determine who has started or stopped talking. Use this instead of Salsa3D.isTalking for event-based implementations.

C#:
void Salsa_OnTalkStatusChanged(SalsaStatus status)
{
	Debug.Log("Salsa_OnTalkStatusChanged:" +
		" instance(" + status.instance.GetType() + ")," +
		" talkerName(" + status.talkerName + ")," + 
		((status.isTalking) ? "started" : "finished") + " saying " + status.clipName);
}
JavaScript:
function Salsa_OnTalkStatusChanged(status : SalsaStatus) {
	Debug.Log("Salsa_OnTalkStatusChanged:" +
		" instance(" + status.instance.GetType() + ")," +
		" talkerName(" + status.talkerName + ")," + 
		((status.isTalking) ? "started" : "finished") + " saying " + status.clipName);
}

 


 
SALSA Lip-Sync Unity Asset Logo