Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 --Brad-- · Jun 07, 2014 at 11:53 PM · c#audiorecordinghow-to

Audio Recorder Script, How Do I Use It?

Hey guys, I'm pretty new to unity, been doing it for almost a month but I've been lerking around unity answers for a while for previously posted questions, I've done pretty well so far, I'm almost done with my app in-fact, but the last thing I need to do is record sound from the game.

I've found this script: https://gist.github.com/darktable/2317063

But I don't know how to use it.. I don't see where there's a button to use all of this code, like a Input.GetKeyDown ("R") etc..

Any ideas? Thanks guys!

Comment
Add comment · Show 1
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 --Brad-- · Jun 10, 2014 at 11:19 PM 0
Share

Does anyone know how I can make the following code work for android? http://answers.unity3d.com/questions/606232/how-to-save-an-audio-clip-to-mp3-file.html

This code here apparently works for android and I figure it's because of the following code from this link: https://gist.github.com/darktable/2317063

 var filepath = Path.Combine(Application.persistentDataPath, filename);
  
         Debug.Log(filepath);
  
         // $$anonymous$$ake sure directory exists if user is saving to sub dir.
         Directory.CreateDirectory(Path.GetDirectoryName(filepath));
  
         using (var fileStream = CreateEmpty(filepath)) {
  
             ConvertAndWrite(fileStream, clip);
  
             WriteHeader(fileStream, clip);

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Dizzyman572 · Jun 08, 2014 at 12:12 AM

Hmm, I think the code your looking is meant to convert file format. So it may not even be helping you with what you want to do. Would something like this be your answer? http://docs.unity3d.com/ScriptReference/Microphone.Start.html

Comment
Add comment · Show 5 · 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 --Brad-- · Jun 08, 2014 at 12:52 AM 0
Share

Thanks Dizzy, I don't think so, I've researched $$anonymous$$icrophone before, but I'm pretty sure it's for recording audio through the microphone, not purely in-game audio.

The reason I came across that script was because of this question on here: http://answers.unity3d.com/questions/606232/how-to-save-an-audio-clip-to-mp3-file.html

I tried that guys script that's in java (it works, though I prefer C#) and I was fine with that, it was working on my pc, but I'm making this for android, the guy on the first answer suggested that script I posted and apparently the other guy got it to work, but he doesn't say how..

avatar image Dizzyman572 · Jun 08, 2014 at 01:14 AM 0
Share

Oh okay, sorry that I wasn't much help. Hmm, have tried contacting the guy. I'll definitely think more about this question.

avatar image --Brad-- · Jun 08, 2014 at 02:04 AM 0
Share

No worries man, yeah I might have to try to contact him via the forums, but I'm not sure if he's still paying attention to this place..

Alright, thanks!

avatar image AlucardJay · Jun 08, 2014 at 02:38 AM 0
Share

Have you read the forum thread that the code was derived from?

avatar image --Brad-- · Jun 08, 2014 at 03:32 AM 0
Share

No I hadn't, but after looking now, I can't seem to find a way to use it either

avatar image
0

Answer by rmib200 · Jul 23, 2018 at 03:04 AM

Any answer so far?

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

24 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

Related Questions

Distribute terrain in zones 3 Answers

How to Save Audio Clip through Script in unity3d? 0 Answers

Audio Record Limit? 1 Answer

Multiple Cars not working 1 Answer

Audio Trigger 3 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