Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 1120198 · Jun 13, 2016 at 12:46 PM · audiomicrophone

Capture audio without playing it back

I am trying to use a microphone and process the audio captured. I managed to do all that, but I have a problem... My audio captured is automatically played to the user, and I don't want that.

 audioSrc.clip = Microphone.Start(null, true, 1000, 44100);
 while (!(Microphone.GetPosition(null) > 0)) { }
 audioSrc.Play();

I tried to disable the audio listener and lower the volume of the audio source, but that didn't work.

Anyone knows how I can capture audio without playing it back?

Comment
Add comment · Show 2
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 Dibbie · Jun 14, 2016 at 08:10 AM 0
Share

Iv never tried setting up a mic system in Unity yet, though looking at the documentation for that, it seems like your 2nd condition "loop", will go back to the beginning of the recording and essentially "overlap" tracks... Then your playing it all while this is happening (im assu$$anonymous$$g all 3 lines of code are inside the Update function?) Im sure if you removed the "audioSrc.Play();" line, your issue would be solved, and put that in a condition that checks if the microphone should no longer be recording, THEN play it, if you want a playback right as soon as they finish recording.

You could also try setting audioSrc.$$anonymous$$ute to true as its recording, which may also help, ins$$anonymous$$d of doing it from the inspector.

avatar image SmallLion · Dec 07, 2020 at 02:20 PM 0
Share

i have this question too

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by KyleBlumreisinger · Nov 14, 2017 at 01:00 AM

I have the answer! I found this question today because I had the same question and was hoping someone answered it, but nope. So after hours more research, finally I can be the one to write the answer.

So basically, to stop the echo, you need the audiosource to not be muted, and still be outputting somewhere. Just not somewhere you can hear it. So in the "Output" slot in the inspector for the AudioSource, you just need to give it an output that you can't hear. The solution is to open an AudioMixer (tabs at the top-->Window-->AudioMixer), make a new mixer and a new group in that mixer, slide down the attenuation/volume slider for the new group, and click and drag that new group into your AudioSource's "Output" field.

For better instructions, here's where I got this information from: http://crazyminnowstudio.com/posts/unity-5.2-bug-audiosource.getoutputdata-no-data-when-source-is-muted/

And that very link also provides the following link to a video showing how to do it: https://drive.google.com/file/d/0B1WsYkuIdxLNNlhEb2NhV3F6Wlk/view

Cheers! :D

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 Futurristic · Dec 02, 2020 at 09:32 AM 0
Share

Still its not working in my case:(

avatar image
0

Answer by Peri_95 · Dec 26, 2017 at 07:43 PM

THANK YOU!!

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

7 People are following this question.

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

Related Questions

Guys i need help with audio! 0 Answers

Unity Microphone downsampling audio 2 Answers

Delay with Microphone.Start 1 Answer

Timing pulses from microphone 0 Answers

How to record audio in chunks and send through websocket? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges