Quantcast
Channel: Photon Voice — Photon Engine
Viewing all 671 articles
Browse latest View live

Outgoing audio stream bitrate?

$
0
0
What is a good outgoing audio stream bitrate? I'm using Photon Voice 2, a Sampling Rate of (currently) 16000, and the default bitrate is still 30000. And what does this bitrate mean exactly, in particular in relation to the sampling rate? Does it need to be lower perhaps, e.g. match the 16000 of the sampling rate? (I'm also asking because I'm fighting with voice quality troubles.) Thanks!

Leaving room and rejoining the same room audio issue

$
0
0
Good morning. Let me start by explaining our situation. Two players join a lobby from the unity editor. Player 1 creates a room and this loads a scene. Player 2 selects that room from a list and hits join. Player 2 joins Player 1 in the scene and they can both speak and hear each other. Player 2 then leaves the room and returns to the lobby. He once again selects the room from the list and hits join. Player 1 and Player 2 are both again in the same scene. Player 1 can hear Player 2. Player 2 cannot hear Player 1. This happens in the reverse as well, if Player 1 left the room and comes back. However, if Player 1 and Player 2 join a room and then change the scene together, not going back to the lobby, audio continues to work correctly. It seems our issue seems to be returning to the lobby. We have an object in DoNotDestryOnLoad called VoicePre, that contains the scripts, "Recorder" and "Photon Voice Network." On Photon Voice Network, we have Auto Connect and Join TRUE and Auto Leave and Disconnect TRUE. We are not sure if we are using Voice 2 in a way it was not intended or if we have an issue reconnecting the ability to hear the other person when we re-connect. We do not see any errors in the log and we have attempted to debug, but we cannot seem to locate where this is happening. We are currently using Unity 2017.4.2f2 and Pun 2 v2.6 and installed Voice 2 v2.2. Any help here would be greatly appreciated. -Ted Hartle

"Frame size is 20 ms. For efficency, set it to 10 ms."

$
0
0
Hi! I'm getting the following Warning when using Photon Voice: "WebRTCAudioProcessor: Frame size is 20 ms. For efficency, set it to 10 ms." Setting it to 10ms makes the warning disappear, but is there a tradeoff involved here (if "this.inFrameSize != this.processFrameSize", to quote the code)? What's the background on this, am I setting up the stream to need more bandwidth? (I'm targeting mobile.) Thanks!

AudioOutCapture attaching to another audioListener

$
0
0
Hi! I'm trying to understand the implications of the AudioOutCapture component. When I have the WebRTCAudioDSP component, it during Awake looks for any AudioListener in the scene. My project happens to have a currently unused VR camera, which has an AudioListener so AudioOutCapture attaches to it, but that camera is inactive and is being replaced by an added proper In-person-head mobile camera later on once the Person Photon-instantiates (which happens after room-join). Does AudioOutCapture being attached to this wrong camera cause any issues? (I need proper 3d spatial sound, so not sure if it interferes somehow.) I'm also trying to understand the relation between this AudioOutCapture and the already existing recorder, attached to the same object holding PhotonVoiceNetwork. On the surface, I don't seem to hear any issues. Thanks!

Photon Speaker not playing on Oculus Quest

$
0
0
Hi, I'm using Photon Voice for an application on Oculus Quest (Android 7.1.1). I've follow this tutorial: https://doc.photonengine.com/en-us/voice/v2/getting-started/voice-intro / How To Use Photon Voice Without PUN. I've enable the Debug Echo and it's working perfectly in Unity Editor but not in the Quest. I looked at some values and see that Speaker.IsPlaying is true in Editor but false in Quest. Does this looks like a known behavior ? Thanks

Do earphones improve chat audio quality?

$
0
0
Hi! I have a message in my mobile app to "Use earphones to avoid echo". However, with the WebRTCAudioDSP's echo cancellation, I don't seem to actually get any echoes (after an initial second or so), even when both participants use speakers. I do understand though there may be a cost to having echo be cancelled, i.e. perhaps lack of quality and good audio voice being sometimes suppressed too -- is that correct? Echoes aside, is voice chat when everyone uses earphones better in quality? So my main pondering is whether to suggest to people to use earphones (it's a very technical message, for what's meant to be a very casual app, so that's a cost). Audio chat at the moment is working good, but it's not perfect, so there is room for optimization (and if using earphones optimizes, I might keep the message). Thanks for any estimate!

Native Swift Alternative?

$
0
0
Hello! I've been using Photon Voice for a while now and it has been Awesome!. I was wondering if there is something like this out there that works similar to Photon but for native iOS, maybe using cocoapods. I've been searching but I couldn't find anything simple like this, for the solutions I found I need to contact the company before starting to implement my voice app. Thanks!.

there are 2 audio listeners in the scene

$
0
0
Hi. I am new here, just trying the Voice Demo and getting this notice: there are 2 audio listeners in the scene What can I do to solve this? Thanks!

Divide by zero

$
0
0
Thought you guys would like to see, on my untiy analytics dashboard there's a user on a macbook that got this error when he changed microphone devices during play (plugged in mic headset I believe):
Photon.Voice.Unity.UnityAudioOut.Service () (at E:/Remotely/IPL.Photon/Assets/com.IPL.Photon/Dependencies/Photon/PhotonVoice/PhotonVoiceApi/Platforms/Unity/UnityAudioOut.cs:83)
Photon.Voice.AudioStreamPlayer`1[T].Service () (at E:/Remotely/IPL.Photon/Assets/com.IPL.Photon/Dependencies/Photon/PhotonVoice/PhotonVoiceApi/Core/AudioStreamPlayer.cs:55)
Photon.Voice.Unity.Speaker.Update () (at E:/Remotely/IPL.Photon/Assets/com.IPL.Photon/Dependencies/Photon/PhotonVoice/Code/Speaker.cs:166)

Photon voice connection on Quest

$
0
0
Hi, I am using Photon voice 2 Latest version 2.11 and Unity Version 2018.2.16f1 , I had face the issue Photon voice connection is not working properly. I did connect the Voice sample scene (Photon voice PUN) between Oculus go and Oculus Quest devices. I had never receive the audio from quest devices but go device working nice receive and transmit the audio. Speaker.isLinked is False (Sometimes voice connection takes Much time to transmit the audio). Thanks In advance.

Using (Secure) WebSockets for Photon Voice with Photon Server

$
0
0
Hi, in our scenario we have a quite restrictive network setup. Therefore we are currently testing Photon's capabilites with respect to the different communication protocols for Realtime, PUN and especially Voice. We work with Photon Server v4 (latest version). So far we have been able to successfully use UDP, TCP and even (secure) WebSockets together with the Unity Realtime SDK and the Particle demo. However, when it comes to Photon Voice we are stuck with UDP and TCP. While we are able to configure Secure WebSockets for Photon Voice in the Unity Editor, the protocol falls back to UDP at runtime. Looking at the method VoiceConnection.ConnectUsingSettings() it seems that Photon Voice enforces either UDP or TCP on Photon Server. Questions: 1) Is Voice over (secure) WebSockets officially supported? 2) Regardless of the official support statement, is there any chance to get Photon Voice running with (Secure) WebSockets? How? Thank you

Photon Voice - You can hear your voice in the headphones when starting DemoVoice-PushToTalk-Scene

$
0
0
Hello, How can I deactivate this echo ? I haven't found the source of the echo since it only happens when the scene starts. I deactivated all objects in the scene but it still happens so it must be some process that starts the microphone and lets it echo whatever you speak into it. In other scenes that do involve Photon Voice this does not happen which leads me to believe it is strictly related to something Photon Voice is doing after starting. Thank you for the help.

Photon Voice 2 not working on Oculus Quest (Unity3D)

$
0
0
I have created a VR multiplayer room using PUN2 which works well and I'm trying to add a voice chat support. I have followed meticulously the installation guide (https://doc.photonengine.com/en-us/voice/current/getting-started/voice-for-pun) and I'm able to activate the Debug echo and hear myself once in the room. The problem is that when I test with 2 Quest or a 1 Quest and the editor I cannot hear a sound. The current setup is the following:
  • Photon Voice Network script added to a Global object in the room and with a pointed to the speak prefab
  • The speaker prefab is a LocalPlayerController which contains a LocalAvatar
  • The LocalAvatar contains the PhotonView Object, PhotonVoiceView Object, Recorder (connected to the PhotonVoiceView), Speaker (connected to the PhotonVoiceView), Audio Source and MicAmplifier (downloaded following the link provided by @JohnTube in another thread)
  • I have disabled "Can own microphone" in the Avatar script
  • I have disabled VAD
  • I have created a Photon Voice app and copy/pasted the App Id in the Photon Settings
  • I have updated the Photon Voice library today (Nov,28th 2019), so I have the latest release.
No specific error gets displayed in the log (I'm able to provide a text file but I would prefer not posting it in on the forum). As previously mentioned, the Debug mode works well (Setup Debug Speaker + Debug Echo). Please find in attachment the screenshots of all the objects configuration. https://ibb.co/3B8nFV8 https://ibb.co/DK6hkWY https://ibb.co/VTtfG4R https://ibb.co/V2rx8C0 https://ibb.co/qdrHY00 https://ibb.co/yBzmTPb https://ibb.co/mFY375Q https://ibb.co/w0FpPdJ https://ibb.co/Hxbwk3y

UWP Failed Windows App Certification Kit

$
0
0
Using Unity 2019.2.14f1 with PhotonVoice 2.12 Perform a store verification before submitting to the Microsoft Store, throws the following errors: Error Found: The binary analyzer test detected the following errors: File C:\Program Files\WindowsApps\41340LighthouseGamesStudi.Flirt-thegame_1.0.0.0_x64__xrpbzce7n1xhy\libyuv.dll has failed the AppContainerCheck check. File C:\Program Files\WindowsApps\41340LighthouseGamesStudi.Flirt-thegame_1.0.0.0_x64__xrpbzce7n1xhy\vpx.dll has failed the AppContainerCheck check. Error Found: The supported APIs test detected the following errors: API __C_specific_handler in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API __std_type_info_destroy_list in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API __telemetry_main_invoke_trigger in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API __telemetry_main_return_trigger in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API memchr in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API memcpy in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API memset in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API strstr in vcruntime140.dll is not supported for this application type. libyuv.dll calls this API. API __CxxFrameHandler4 in vcruntime140_1_app.dll is not supported for this application type. GameAssembly.dll calls this API. API __CxxFrameHandler4 in vcruntime140_1_app.dll is not supported for this application type. Flirt.exe calls this API.

How to configure the android API level when using Photon Voice 2 in unity2018

$
0
0
Now our configurations are Minimum API level 19, Target API Level 22. and everything is OK. But when we configure a higher API level, the voice cannot be transferred successfully.Does Photon Voice have special requirements about this??Thank you.

Can users in different rooms talk to each other?

$
0
0
I have implemented a system with Photon Chat that allows users to chat with people in their current room and with friends in other rooms. Is it possible to do something similar with Photon Voice, or do the users have to be in the same room?

Photon Voice on Magic Leap One

$
0
0

Hi,

I have the following problem. i want to use Photon Voice with Magic Leap One. When I try to talk between my glasses and someone using the PC, I hear in the ML when the person on the pc is talking but not the other way round. I get the error below when I start the example that comes with Photon Voice. I found an add on for Magic Leap here: https://www.photonengine.com/en-us/sdks#voice-sdkvoicemagicleapaddon

But the download is blocked and I don't know how to join the XR developer circle. How can I find this? Can anyone help me with that?


BR, Elisabeth

 [PV] OpusCodec.Encoder: System.EntryPointNotFoundException: Unable to find an entry point named 'opus_encoder_ctl_set' in 'opus_egpv'.

12-13 16:23:00.246 1610    1 E Unity  :  at UnityEngine.Playables.PlayableDirector.SendOnPlayableDirectorStop () [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at POpusCodec.Wrapper.opus_encoder_ctl_set (System.IntPtr st, POpusCodec.Enums.OpusCtlSetRequest request, System.Int32 value) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at POpusCodec.Wrapper.set_opus_encoder_ctl (System.IntPtr st, POpusCodec.Enums.OpusCtlSetRequest request, System.Int32 value) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at POpusCodec.OpusEncoder.set_Bitrate (System.Int32 value) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at POpusCodec.OpusEncoder..ctor (POpusCodec.Enums.SamplingRate inputSamplingRateHz, POpusCodec.Enums.Channels numChannels, System.Int32 bitrate, POpusCodec.Enums.OpusApplicationType applicationType, POpusCodec.Enums.Delay encoderDelay) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.OpusCodec+Encoder`1[T]..ctor (Photon.Voice.VoiceInfo i, Photon.Voice.ILogger logger) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.OpusCodec+EncoderFloat..ctor (Photon.Voice.VoiceInfo i, Photon.Voice.ILogger logger) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.OpusCodec+Factory.CreateEncoder[B] (Photon.Voice.VoiceInfo i, Photon.Voice.ILogger logger) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoiceAudio`1[T].CreateDefaultEncoder (Photon.Voice.VoiceInfo info) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoice..ctor (Photon.Voice.VoiceClient voiceClient, Photon.Voice.IEncoder encoder, System.Byte id, Photon.Voice.VoiceInfo voiceInfo, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoiceFramedBase..ctor (Photon.Voice.VoiceClient voiceClient, Photon.Voice.IEncoder encoder, System.Byte id, Photon.Voice.VoiceInfo voiceInfo, System.Int32 channelId, System.Int32 frameSize) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoiceFramed`1[T]..ctor (Photon.Voice.VoiceClient voiceClient, Photon.Voice.IEncoder encoder, System.Byte id, Photon.Voice.VoiceInfo voiceInfo, System.Int32 channelId, System.Int32 frameSize) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoiceAudio`1[T]..ctor (Photon.Voice.VoiceClient voiceClient, Photon.Voice.IEncoder encoder, System.Byte id, Photon.Voice.VoiceInfo voiceInfo, Photon.Voice.IAudioDesc audioSourceDesc, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoiceAudioFloat..ctor (Photon.Voice.VoiceClient voiceClient, Photon.Voice.IEncoder encoder, System.Byte id, Photon.Voice.VoiceInfo voiceInfo, Photon.Voice.IAudioDesc audioSourceDesc, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.LocalVoiceAudio`1[T].Create (Photon.Voice.VoiceClient voiceClient, System.Byte voiceId, Photon.Voice.IEncoder encoder, Photon.Voice.VoiceInfo voiceInfo, Photon.Voice.IAudioDesc audioSourceDesc, System.Int32 channelId) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.VoiceClient+<>c__DisplayClass45_0`1[T].<CreateLocalVoiceAudio>b__0 (System.Byte vId, System.Int32 chId) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at System.Func`3[T1,T2,TResult].Invoke (T1 arg1, T2 arg2) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.VoiceClient.createLocalVoice (System.Int32 channelId, System.Func`3[T1,T2,TResult] voiceFactory) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.VoiceClient.CreateLocalVoiceAudio[T] (Photon.Voice.VoiceInfo voiceInfo, Photon.Voice.IAudioDesc audioSourceDesc, System.Int32 channelId, Photon.Voice.IEncoder encoder) [0x00000] in <00000000000000000000000000000000>:0

12-13 16:23:00.246 1610    1 E Unity  :  at Photon.Voice.VoiceClient.CreateLocalVoiceAudioFromSource (Photon.Voice.VoiceInfo voiceInfo, Photon.Voice.IAudioDesc source, System.B

Some Questions about SocketException 10054 thrown from ExitGames.Client.Photon.SocketTcpAsync.

$
0
0

The Exception message:

2019-12-18 14:10:39.761 10511-10543/? E/Unity: SocketTcpAsync.EndReceive SocketException. State: Connected. Server: '47.100.93.146' ErrorCode: 10054 SocketErrorCode: ConnectionReset Message: Connection reset by peer System.Net.Sockets.SocketException (0x80004005): Connection reset by peer

   at System.Net.Sockets.Socket.EndReceive (System.IAsyncResult asyncResult) [0x00012] in <3845a180c26b4889bc2d47593a665814>:0 

   at ExitGames.Client.Photon.SocketTcpAsync.ReceiveAsync (System.IAsyncResult ar) [0x00023] in <e2387f9dc4784e52ba991612d3ef9d57>:0 


We cannot see relevant codes  about this exception ,but it may have some affects to our application, I have two questions as follows:

1. Is ExitGames.Client.Photon.SocketTcpAsync.ReceiveAsync executed in the Unity main thread?

2.Is this function included in a try catch sentence?


Thanks,

Harlan.

Im just lost with photon voice setup

$
0
0
This should be easy but it just isn't. Are there any better tutorials out there for me to learn how to properly setup and script the setup of photon voice? There are like zero youtube tutorials (for pun2) or otherwise out there for this. My voice is recognized by the recorder (as shown by the levels) but plays nothing when I enable the debugecho.

I have 1 persistant object setup:
* Recorder
* PhotonVoiceNetwork

Then On the player I have:
* PhotonView
* Speaker

I have setup the primary recorder and speaker. I literally have no idea what I am doing wrong. The docs are super sparse on the specifics as well. If anyone is willing to help me out with ANY information that would be great. I'm willing to provide anything else that would be helpful.

Here is my persistant object:
https://imgur.com/5Gojaib

Here is my player object:
https://imgur.com/U2Mznn4

The "Voice Chat" on the player will populate the recorder at runtime from the persistant object. The one on the persistant object has been disable to remove as many potential areas for errors as possible.

Capture microphone input from Quest while others are in a room speaking

$
0
0
Setup:
There are user in an open world where they can speak with each other using photon voice. Now one user wants to say something that is then transcribed by an online service (This happens by pressing a button).

System:
Quest with Unity 2019.2.3f1

What I tried:
1) Using Unitys internal mic - but this does interfer with the one that photon uses which will result into not hearing anybody after transcribing.

2) Looking at WebRTC tut where onAudioFrameFloat() and FloatProcessor() was used.

There is a strange case, that after my class
[RequireComponent(typeof(Recorder))]
public class VoiceController : VoiceComponent

awkes
protected override void Awake()
    {
        LogManager.Instance.Log("000 AWAKE");
        base.Awake();
        _isRecording = false;
        AudioListener audioListener = FindObjectOfType<AudioListener>();
        if (audioListener != null)
        {
            AudioOutCapture aoc = audioListener.GetComponent<AudioOutCapture>();
            if (aoc == null)
            {
                aoc = audioListener.gameObject.AddComponent<AudioOutCapture>();
                LogManager.Instance.Log("000 AudioOutCapture was init");
            }

            // maybe this works
            aoc.OnAudioFrame += this.OnAudioOutFrameFloat;

            _aoc = aoc;

        }
        else
        {
            LogManager.Instance.Log("AUDIOLISENER IS NULL");
        }
    }

the method assigned by aoc.OnAudioFrame += is never called although it is implemented in the same class. In the class is also a start and stop- recording method, where I earlier tried using the _aoc to assign the OnAudioOutFrameFloat, but after awake _aoc is somehow null ???

Ealier I tried using the FloatProcessor(), but I think it is not supposed to capture audio. (Did also not work)


Please help me by pointing at maybe other possible approaches. If you need more code I can post it too.

Thanks in advance.
Viewing all 671 articles
Browse latest View live