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
2
Question by omidnoor · Mar 19, 2013 at 08:08 PM · audiosaveloadaudiocliprecord

Record/Save/Playback of Audio clips.. How to?

Hi,

I am working on recording an audio clip, saving it to disk and playing it back the next time the scene is loaded. Currently i am doing these:

  1. Record using AudioSource, AudioClip and Microphone methods.

  2. Playback the AudioClip while the scene is running.

My problem is that once the scene transitions to another, I want to save these AudioClips as files (.wav or other) on disk. On reloading the scene, I want to load them from the disk to the Audioclip again. Now, since the files are created during runtime, I am not sure if i ll be able to load them into assets. Also if i want to store them as AudioClips themselves, is there anyway I can save/load these in the application?

Any help is appreciated. Thanks

Comment
Add comment · Show 3
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 hrlarsen · Mar 19, 2013 at 09:28 PM 0
Share

this might be helpful? http://forum.unity3d.com/threads/119295-Writing-AudioListener-GetOutputData-to-wav-problem

avatar image omidnoor · Mar 19, 2013 at 10:10 PM 0
Share

@hrlarsen - I followed that thread for saving the file. But the question is regarding loading the wav file into the project as an AudioClip afterwards. The Resource bundle is created at build-time right? So how do i get this file into the resources at run-time? Am i making myself clear?

avatar image Xudarker · Mar 21, 2016 at 11:18 PM 0
Share

dude,have u solve this problem? @omidnoor

3 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by omidnoor · Mar 22, 2013 at 12:47 AM

Figured out the way to go as this .. If someone s wondering,

  1. Record Audio clip using Microphone.

  2. Save to wav file on to the disk using the above link script.

  3. Read Asset using WWW class, load to audio clip.

  4. Playback.

Comment
Add comment · Show 2 · 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 KnightRiderGuy · Dec 04, 2015 at 02:54 PM 0
Share

Thanks for sharing that man, 10 points sent your way :D

avatar image schashm3 · Oct 31, 2018 at 01:09 AM 0
Share

how can i record the microphone and other sound in scene together? i wrote a drum pad application with unity and i want to record mic and other sound and i want save them to a wave file(mixed)...i used of "savwav" script..how can i give to "savwave.save" two output AudioSource? can i use AudioListener and give GetOutputData to that? if i can..how..please help me...i cant fine my solution..sorry for bad English...

avatar image
2

Answer by Graham-Dunnett · Mar 19, 2013 at 08:41 PM

The example at http://docs.unity3d.com/Documentation/ScriptReference/AudioSource.SetScheduledEndTime.html shows how you can save audio clips as wav files.

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 omidnoor · Mar 19, 2013 at 10:09 PM 0
Share

thanks for the info. I am already able to do record/save. $$anonymous$$y question is regarding how to get this saved file into the project (saved) during run-time, or other methods to store audio clips and load them later in the same execution run.

avatar image
0

Answer by schashm3 · Nov 03, 2018 at 01:43 PM

how can i record the microphone and other sound in scene together? i wrote a drum pad application with unity and i want to record mic and other sound and i want save them to a wave file(mixed)...i used of "savwav" script..how can i give to "savwave.save" two output AudioSource? can i use AudioListener and give GetOutputData to that? if i can..how..please help me...i cant fine my solution..sorry for bad English... @omidnoor , @Graham-Dunnett

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 zacharyaghaizu · Dec 04, 2020 at 11:17 AM 0
Share

Did you figure this out? I'm trying to get a recording, saving and trigger achieved

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

17 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

Related Questions

Is it possible to load external audio files during a game? 0 Answers

Existing solution for load MP3 from disc ? 2 Answers

Long Save time on Audioclip 0 Answers

Can you load an AudioClip from the file system w/o using WWW? 0 Answers

How to play audio from Application.persistentDataPath? 2 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