Photon Voice
v2.7
|
Component representing outgoing audio stream in scene. More...
Inherits VoiceComponent.
Classes | |
class | PhotonVoiceCreatedParams |
Public Types | |
enum | InputSourceType |
enum | MicType |
enum | SampleTypeConv |
Public Member Functions | |
void | Init (VoiceClient voiceClient, object customObj=null) |
Initializes the Recorder component to be able to transmit audio. More... | |
void | ReInit () |
void | RestartRecording () |
Restarts recording if something has changed that requires this. More... | |
void | VoiceDetectorCalibrate (int durationMs) |
Trigger voice detector calibration process. While calibrating, keep silence. Voice detector sets threshold basing on measured backgroud noise level. More... | |
void | StartRecording () |
Starts recording. More... | |
void | StopRecording () |
Stops recording. More... | |
Protected Member Functions | |
virtual void | SendPhotonVoiceCreatedMessage () |
Protected Member Functions inherited from VoiceComponent | |
virtual void | Awake () |
Properties | |
static AudioInEnumerator | PhotonMicrophoneEnumerator [get] |
Enumerator for the available microphone devices gathered by the Photon plugin. More... | |
bool | IsInitialized [get] |
If true, this Recorder has been initialized and is ready to transmit to remote clients. Otherwise call Init. More... | |
bool | RequiresInit [get] |
bool | RequiresRestart [get, protected set] |
Returns true if something has changed in the Recorder while recording that won't take effect unless recording is restarted using RestartRecording. More... | |
bool | TransmitEnabled [get, set] |
If true, audio transmission is enabled. More... | |
bool | Encrypt [get, set] |
If true, voice stream is sent encrypted. More... | |
bool | DebugEchoMode [get, set] |
If true, outgoing stream routed back to client via server same way as for remote client's streams. More... | |
bool | ReliableMode [get, set] |
If true, stream data sent in reliable mode. More... | |
bool | VoiceDetection [get, set] |
If true, voice detection enabled. More... | |
float | VoiceDetectionThreshold [get, set] |
Voice detection threshold (0..1, where 1 is full amplitude). More... | |
int | VoiceDetectionDelayMs [get, set] |
Keep detected state during this time after signal level dropped below threshold. Default is 500ms More... | |
object | UserData [get, set] |
Custom user object to be sent in the voice stream info event. More... | |
Func< IAudioDesc > | InputFactory [get, set] |
Set the method returning new Voice.IAudioDesc instance to be assigned to a new voice created with Source set to Factory More... | |
AudioUtil.IVoiceDetector | VoiceDetector [get] |
Returns voice activity detector for recorder's audio stream. More... | |
string | UnityMicrophoneDevice [get, set] |
Set or get Unity microphone device used for streaming. More... | |
int | PhotonMicrophoneDeviceId [get, set] |
Set or get photon microphone device used for streaming. More... | |
byte | AudioGroup [get, set] |
Target interest group that will receive transmitted audio. More... | |
byte | InterestGroup [get, set] |
Target interest group that will receive transmitted audio. More... | |
bool | IsCurrentlyTransmitting [get] |
Returns true if audio stream broadcasts. More... | |
AudioUtil.ILevelMeter | LevelMeter [get] |
Level meter utility. More... | |
bool | VoiceDetectorCalibrating [get] |
If true, voice detector calibration is in progress. More... | |
ILocalVoiceAudio | voiceAudio [get] |
InputSourceType | SourceType [get, set] |
Audio data source. More... | |
MicType | MicrophoneType [get, set] |
Which microphone API to use when the Source is set to Microphone. More... | |
SampleTypeConv | TypeConvert [get, set] |
Force creation of 'short' pipeline and convert audio data to short for 'float' audio sources. More... | |
AudioClip | AudioClip [get, set] |
Source audio clip. More... | |
bool | LoopAudioClip [get, set] |
Loop playback for audio clip sources. More... | |
POpusCodec.Enums.SamplingRate | SamplingRate [get, set] |
Outgoing audio stream sampling rate. More... | |
OpusCodec.FrameDuration | FrameDuration [get, set] |
Outgoing audio stream encoder delay. More... | |
int | Bitrate [get, set] |
Outgoing audio stream bitrate. More... | |
bool | IsRecording [get, set] |
Gets or sets whether this Recorder is actively recording audio to be transmitted. More... | |
bool | ReactOnSystemChanges [get, set] |
bool | AutoStart [get, set] |
If true, automatically start recording when initialized. More... | |
Properties inherited from VoiceComponent | |
VoiceLogger | Logger [get, protected set] |
DebugLevel | LogLevel [get, set] |
Properties inherited from ILoggable | |
DebugLevel | LogLevel [get, set] |
VoiceLogger | Logger [get] |
Additional Inherited Members | |
Protected Attributes inherited from VoiceComponent | |
DebugLevel | logLevel = DebugLevel.ERROR |
Detailed Description
Component representing outgoing audio stream in scene.
Member Function Documentation
void Init | ( | VoiceClient | voiceClient, |
object | customObj = null |
||
) |
Initializes the Recorder component to be able to transmit audio.
- Parameters
-
voiceClient The VoiceClient to be used with this Recorder. customObj Optional user data object to be transmitted with the voice stream info
void RestartRecording | ( | ) |
Restarts recording if something has changed that requires this.
void StartRecording | ( | ) |
Starts recording.
void StopRecording | ( | ) |
Stops recording.
void VoiceDetectorCalibrate | ( | int | durationMs | ) |
Trigger voice detector calibration process. While calibrating, keep silence. Voice detector sets threshold basing on measured backgroud noise level.
- Parameters
-
durationMs Duration of calibration in milliseconds.
Property Documentation
|
getset |
Source audio clip.
|
getset |
Target interest group that will receive transmitted audio.
If AudioGroup != 0, recorder's audio data is sent only to clients listening to this group.
|
getset |
If true, automatically start recording when initialized.
|
getset |
Outgoing audio stream bitrate.
|
getset |
If true, outgoing stream routed back to client via server same way as for remote client's streams.
|
getset |
If true, voice stream is sent encrypted.
|
getset |
Outgoing audio stream encoder delay.
|
getset |
Set the method returning new Voice.IAudioDesc instance to be assigned to a new voice created with Source set to Factory
|
getset |
Target interest group that will receive transmitted audio.
If InterestGroup != 0, recorder's audio data is sent only to clients listening to this group.
|
get |
Returns true if audio stream broadcasts.
|
get |
|
getset |
Gets or sets whether this Recorder is actively recording audio to be transmitted.
|
get |
Level meter utility.
|
getset |
Loop playback for audio clip sources.
|
getset |
Which microphone API to use when the Source is set to Microphone.
|
getset |
Set or get photon microphone device used for streaming.
|
staticget |
Enumerator for the available microphone devices gathered by the Photon plugin.
|
getset |
If true, stream data sent in reliable mode.
|
getprotected set |
Returns true if something has changed in the Recorder while recording that won't take effect unless recording is restarted using RestartRecording.
Think of this as a "isDirty" flag.
|
getset |
Outgoing audio stream sampling rate.
|
getset |
Audio data source.
|
getset |
If true, audio transmission is enabled.
|
getset |
Force creation of 'short' pipeline and convert audio data to short for 'float' audio sources.
|
getset |
Set or get Unity microphone device used for streaming.
|
getset |
Custom user object to be sent in the voice stream info event.
|
getset |
If true, voice detection enabled.
|
getset |
Keep detected state during this time after signal level dropped below threshold. Default is 500ms
|
getset |
Voice detection threshold (0..1, where 1 is full amplitude).
|
get |
Returns voice activity detector for recorder's audio stream.
|
get |
If true, voice detector calibration is in progress.