This document is about: VOICE 1
SWITCH TO

Photon Voice 1 is the original and first major version of Photon Voice. It is now replaced by Photon Voice 2 which is refactored and enhanced. We highly recommend starting new projects with Photon Voice 2 and if possible migrating existing ones from Photon Voice 1 to Photon Voice 2. Photon Voice will be maintained for the coming months. We will fix important bugs and support new Unity versions but new features will be added only to Photon Voice 2.

Frequently Asked Questions

Which Photon product is the right one for me?

The answer to this depends mostly on your project and team.
Generally, we suggest to use either Fusion or
Quantum, which are our most advanced client solutions.

For a quick overview, both product sheets contain the product picker "Quadrant":

Additionally, this page discusses using the Photon Cloud or Photon Server?.

Feel free to reach out to us for any questions.

Photon Cloud

Is Photon Cloud down?

Our Photon Cloud Status Page shows the current and past status per product.
Information about incidents is also published on twitter: @photon_status.

Is there a default Photon Cloud region?

Actually, there is no default region. Clients know the Name Server address for the Photon Cloud. They are global and used to provide an up to date region list for the given AppId.

Clients will ping each region and identify the "Best Region", which has the lowest latency.

If none of the regions can be pinged successfully, the first region of the list is used.

Can we get a list of all Cloud servers / IPs?

Such a list does not exist as the Photon Cloud is changing too frequently. Servers get added or removed and even new regions show up from time to time. This means it is impossible to add the Photon Cloud (as a whole) to an allow-list.

It is a different topic for an Enterprise Cloud. We'd discuss this via mail.

Apps within the Photon Industries Circle can rely on the host name for allow-listing: *.photonindustries.io.

Is it possible to disable some regions?

Yes.
It works in the other way around by defining a list of allowed regions.
Read more about the "Dashboard Regions Filtering".

Photon Voice

How to save conversations into files?

We will answer this question in two parts:

First, incoming voice streams:

Photon Voice streams are uniquely identified using the pair: PlayerId and VoiceId.
So given this pair you can guess the origin of the remote voice stream: which player and which recorder.
You can subscribe to three events for remote streams:

  • PhotonVoiceNetwork.Client.OnRemoteVoiceInfoAction: a new remote voice stream is created (started transmission) with information received.
  • PhotonVoiceNetwork.Client.OnAudioFrameAction: an audio frame is received from a specific remote voice stream.
  • PhotonVoiceNetwork.Client.OnRemoteVoiceRemoveAction: a remote voice stream has ended and is destroyed (stopped transmission).

If you want to capture an entire incoming remote voice stream, you can:

  1. Create and open file for the stream in OnRemoteVoiceInfoAction handler.
  2. Write frame of audio data in OnAudioFrameAction handler.
  3. Save and close the file in OnRemoteVoiceRemoveAction handler.

Or you can open and close file and update OnAudioFrameAction accordingly on user input.

Second, outgoing voice streams:

For outgoing audio stream, you can create Voice.LocalVoiceAudio<T>.IProcessor and insert it in local voice processing pipeline.
The component needs to be attached to the same GameObject as the PhotonVoiceRecorder to intercept PhotonVoiceCreated Unity message.
You can find get locally recorded audio frame in IProcessor.Process.
See "DelayProcessor.cs" in TestVoice folder for a demo.

How to use a custom audio source?

If you want the PhotonVoiceRecorder to transmit audio produced by your own custom audio source:

First approach: data stream is driven by consumer

AudioClipWrapper is a sample of this approach.
It streams audio clip assigned PhotonVoiceRecorder.AudioClip.

  1. Create a class reading your audio source and implementing ExitGames.Client.Photon.Voice.IAudioReader interface. e.g. MyAudioReaderSource.

  2. Set PhotonVoiceRecorder's Source to Factory in editor (or in code).

  3. Create an instance of your class somewhere during app initialization (before creation of PhotonVoiceRecorder):

    C#

    // MyAudioReaderSource is just an example, replace with your own class name and constructor
    PhotonVoiceNetwork.AudioSourceFactory = () => new MyAudioReaderSource(); 
    
  4. As long as client is connected to a voice room and PhotonVoiceRecorder is transmitting, IAudioReader.Read(float[] buffer) method will be called on your custom audio source instance (e.g. MyAudioReaderSource).
    Calls frequency and buffer size are adjusted to meet sampling rate returned by IAudioReader.SamplingRate property of your custom audio source instance (e.g. MyAudioReaderSource).

Second approach: data stream is driven by producer

ToneAudioPusher in "AudioUtil.cs" is a sample of this approach.

  1. In this case it may be more convenient to implement ExitGames.Client.Photon.Voice.IAudioPusher interface instead. e.g. MyAudioPusherSource.
    You need to implement IAudioPusher.SetCallback method only which mainly stores given callback.

  2. Set PhotonVoiceRecorder's Source to Factory in editor (or in code).

  3. Create an instance of your class somewhere during app initialization (before creation of PhotonVoiceRecorder):

    C#

    // MyAudioPusherSource is just an example, replace with your own class name and constructor
    PhotonVoiceNetwork.AudioSourceFactory = () => new MyAudioPusherSource(); 
    
  4. During streaming, you simply call the callback set using IAudioPusher.SetCallback periodically (e.g. from MonoBehaviour.OnAudioFilterRead) with as many samples as you have.
    Photon Voice will do all buffering work for you.

Billing

Do you have special offers for students, hobbyists or indies?

All our products have a free tier and a one-off entry-plan.
We also usually take part in Unity's asset store sales and occasionally give vouchers to lucky ones.

Can I combine more than one 100 CCU plan for a single Photon application?

No.
The 100 CCU plans are not stackable and can be applied only once per AppId.
If you purchase multiple PUN+ asset seats then you must redeem each 100 free CCU for a separate AppId.
If you need more CCU for a single app, the next higher plan is the 500 CCU one.
If you subscribe to a monthly or yearly plan, then you will still keep the 100 CCUs for 12 months on top of / in addition to the CCU from your monthly/yearly plan.

Back to top