• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Gureen_Ryuu · Aug 23, 2016 at 12:20 PM · voicevoicechat

Echo/Feedback loop in VoiceChat over phone/speaker.

We've implemented VoiceChat ( https://github.com/fholm/unityassets/tree/master/VoiceChat ) to use it in an Android game.

The problem is, when two people are talking, since the voice is coming from the phone's speaker instead of headphones, there'll be a feedback loop of the voice with echo. Why is this happening when it doesn't happen in normal phone calls with speakers? And is there any way to prevent it in Unity?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Aug 23, 2016 at 01:54 PM

The feedback does always happen. So the question should be: Why do you not hear such loopbacks in other pieces of software. The reason is that advanced voice chat software (like skype / teamspeak) have implemented a quite complicated audio analysis of the microphone and with respect to some delay they try to subtract the speaker signal from the microphone input.

This is by far more complicated than it sounds ^^. The phase of the two audio signals have to perfectly match. So the data that goes out the speaker will arrive a tiny bit later at the mic. So depending on the room properties in respect to size and echo that time will vary. Also you can have multiple reflections off walls which makes it even more complicated.

See this post. Also have a look at this post, it's not directly related but shows some of the problems you have to tackle.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Gureen_Ryuu · Aug 23, 2016 at 02:00 PM 0
Share

I was scared that was going to be the answer... :(

Are there any Unity libraries/assets that already handle this? Seeing as how, as you mention, it's quite the endeavor to do this from scratch.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

54 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Voice chat in browser based unity projects 3 Answers

Teamspeak SDK, Client fails to open devices 0 Answers

Teamspeak SDK, EntryPointNotFoundException 1 Answer

Is there any way to record voice in Unidy3D? 3 Answers

Android based virtual companion using voice exchange 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges