Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:OnlineVoiceInterface (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Interface >> OnlineVoiceInterface
Package: 
Engine
Known implementing classes:
OnlineSubsystemPC
This interface in other games:
UT3

This interface deals with voice over IP. It is responsible for registering, unregistering, and filtering talkers. It also handles special voice effects. This interface also provides hooks for accessing the raw data to perform operations on it, such as speech recognition, lip sync, etc.

Delegates[edit]

OnPlayerTalkingStateChange[edit]

delegate OnPlayerTalkingStateChange (OnlineSubsystem.UniqueNetId Player, bool bIsTalking)

Called when a player is talking either locally or remote. This will be called once for each active talker each frame.

Parameters:

  • Player - the player that is talking
  • bIsTalking - if true, the player is now talking, if false they are no longer talking

OnRecognitionComplete[edit]

delegate OnRecognitionComplete ()

Called when speech recognition for a given player has completed. The consumer of the notification can call GetRecognitionResults() to get the words that were recognized

Instance functions[edit]

AddPlayerTalkingDelegate[edit]

function AddPlayerTalkingDelegate (delegate<OnPlayerTalkingStateChangeTalkerDelegate)

Adds a talker delegate to the list of notifications

Parameters:

  • TalkerDelegate - the delegate to call when a player is talking

AddRecognitionCompleteDelegate[edit]

function AddRecognitionCompleteDelegate (byte LocalUserNum, delegate<OnRecognitionCompleteRecognitionDelegate)

Adds the speech recognition notification callback to list of callbacks for the specified user

Parameters:

  • LocalUserNum - the local user to receive notifications for
  • RecognitionDelegate - the delegate to call when recognition is complete

ClearPlayerTalkingDelegate[edit]

function ClearPlayerTalkingDelegate (delegate<OnPlayerTalkingStateChangeTalkerDelegate)

Removes a talker delegate to the list of notifications

Parameters:

  • TalkerDelegate - the delegate to remove from the notification list

ClearRecognitionCompleteDelegate[edit]

function ClearRecognitionCompleteDelegate (byte LocalUserNum, delegate<OnRecognitionCompleteRecognitionDelegate)

Clears the speech recognition notification callback to use for the specified user

Parameters:

  • LocalUserNum - the local user to receive notifications for
  • RecognitionDelegate - the delegate to call when recognition is complete

GetRecognitionResults[edit]

function bool GetRecognitionResults (byte LocalUserNum, out array<OnlineSubsystem.SpeechRecognizedWordWords)

Gets the results of the voice recognition Will not return results that were below the SpeechRecognition's ConfidenceThreshold, so you may get an empty array back

Parameters:

  • LocalUserNum - the local user to read the results of
  • Words - the set of words that were recognized by the voice analyzer

Returns:

true upon success, false otherwise

IsHeadsetPresent[edit]

function bool IsHeadsetPresent (byte LocalUserNum)

Determines if the specified player has a headset connected

Parameters:

  • LocalUserNum - the local player index being queried

Returns:

TRUE if the player has a headset plugged in, FALSE otherwise

IsLocalPlayerTalking[edit]

function bool IsLocalPlayerTalking (byte LocalUserNum)

Determines if the specified player is actively talking into the mic

Parameters:

  • LocalUserNum - the local player index being queried

Returns:

TRUE if the player is talking, FALSE otherwise

IsRemotePlayerTalking[edit]

function bool IsRemotePlayerTalking (OnlineSubsystem.UniqueNetId PlayerId)

Determines if the specified remote player is actively talking into the mic NOTE: Network latencies will make this not 100% accurate

Parameters:

  • PlayerId - the unique id of the remote player being queried

Returns:

TRUE if the player is talking, FALSE otherwise

MuteAll[edit]

function bool MuteAll (byte LocalUserNum, bool bAllowFriends)

Mutes all voice or all but friends

Parameters:

  • LocalUserNum - the local user that is making the change
  • bAllowFriends - whether to mute everyone or allow friends

MuteRemoteTalker[edit]

function bool MuteRemoteTalker (byte LocalUserNum, OnlineSubsystem.UniqueNetId PlayerId)

Mutes a remote talker for the specified local player. NOTE: This is separate from the user's permanent online mute list

Parameters:

  • LocalUserNum - the user that is muting the remote talker
  • PlayerId - the remote talker that is being muted

Returns:

TRUE if the function succeeds, FALSE otherwise

RegisterLocalTalker[edit]

function bool RegisterLocalTalker (byte LocalUserNum)

Registers the user as a talker

Parameters:

  • LocalUserNum - the local player index that is a talker

Returns:

TRUE if the call succeeded, FALSE otherwise

RegisterRemoteTalker[edit]

function bool RegisterRemoteTalker (OnlineSubsystem.UniqueNetId PlayerId)

Registers a remote player as a talker

Parameters:

  • PlayerId - the unique id of the remote player that is a talker

Returns:

TRUE if the call succeeded, FALSE otherwise

SelectVocabulary[edit]

function bool SelectVocabulary (byte LocalUserNum, int VocabularyId)

Changes the vocabulary id that is currently being used

Parameters:

  • LocalUserNum - the local user that is making the change
  • VocabularyId - the new id to use

Returns:

true if successful, false otherwise

SetRemoteTalkerPriority[edit]

function bool SetRemoteTalkerPriority (byte LocalUserNum, OnlineSubsystem.UniqueNetId PlayerId, int Priority)

Sets the relative priority for a remote talker. 0 is highest

Parameters:

  • LocalUserNum - the user that controls the relative priority
  • PlayerId - the remote talker that is having their priority changed for
  • Priority - the relative priority to use (0 highest, < 0 is muted)

Returns:

TRUE if the function succeeds, FALSE otherwise

SetSpeechRecognitionObject[edit]

function bool SetSpeechRecognitionObject (byte LocalUserNum, SpeechRecognition SpeechRecogObj)

Changes the object that is in use to the one specified

Parameters:

  • LocalUserNum - the local user that is making the change
  • SpeechRecogObj - the new object use
  • true - if successful, false otherwise

StartNetworkedVoice[edit]

function StartNetworkedVoice (byte LocalUserNum)

Tells the voice layer that networked processing of the voice data is allowed for the specified player. This allows for push-to-talk style voice communication

Parameters:

  • LocalUserNum - the local user to allow network transimission for

StartSpeechRecognition[edit]

function bool StartSpeechRecognition (byte LocalUserNum)

Tells the voice system to start tracking voice data for speech recognition

Parameters:

  • LocalUserNum - the local user to recognize voice data for

Returns:

true upon success, false otherwise

StopNetworkedVoice[edit]

function StopNetworkedVoice (byte LocalUserNum)

Tells the voice layer to stop processing networked voice support for the specified player. This allows for push-to-talk style voice communication

Parameters:

  • LocalUserNum - the local user to disallow network transimission for

StopSpeechRecognition[edit]

function bool StopSpeechRecognition (byte LocalUserNum)

Tells the voice system to stop tracking voice data for speech recognition

Parameters:

  • LocalUserNum - the local user to recognize voice data for

Returns:

true upon success, false otherwise

UnmuteAll[edit]

function bool UnmuteAll (byte LocalUserNum)

Allows all speakers to send voice

Parameters:

  • LocalUserNum - the local user that is making the change

UnmuteRemoteTalker[edit]

function bool UnmuteRemoteTalker (byte LocalUserNum, OnlineSubsystem.UniqueNetId PlayerId)

Allows a remote talker to talk to the specified local player. NOTE: This call will fail for remote talkers on the user's permanent online mute list

Parameters:

  • LocalUserNum - the user that is allowing the remote talker to talk
  • PlayerId - the remote talker that is being restored to talking

Returns:

TRUE if the function succeeds, FALSE otherwise

UnregisterLocalTalker[edit]

function bool UnregisterLocalTalker (byte LocalUserNum)

Unregisters the user as a talker

Parameters:

  • LocalUserNum - the local player index to be removed

Returns:

TRUE if the call succeeded, FALSE otherwise

UnregisterRemoteTalker[edit]

function bool UnregisterRemoteTalker (OnlineSubsystem.UniqueNetId PlayerId)

Unregisters a remote player as a talker

Parameters:

  • PlayerId - the unique id of the remote player to be removed

Returns:

TRUE if the call succeeded, FALSE otherwise