Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 linaMK86 · Aug 05, 2011 at 01:10 PM · iphonesoundplaybackrecord

Recording voice iphone

Hello,

I create a 3d character of unity and I want to repeat everything he hears (the application is dedicated to iphone),otherwise i want to record sound and play it back immediately.

is that possible to do this in unity? if not you can help me with examples or documentation Thank you for your help and advice

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 DeveshPandey · Sep 27, 2014 at 06:27 AM 0
Share

Use this plugin with full support and supported to all platform.

Assets Store : Voice Recorder

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by aldonaletto · Aug 05, 2011 at 01:37 PM

Unity can't handle external sounds yet - it only reproduces audio files. You should use some DLL to record the sound in any format, and then use the resulting file inside Unity.

EDITED: Oops! You're going to use it in an iPhone... and DLLs are for PCs! Anyway, you should have some external program doing the record and save job, then use the saved file, at least while Unity doesn't include some feature to acquire sounds from mic or aux inputs.

EDITED2: Don't mind, that's what Unity Answers is for: answer questions about Unity. By the way, UA is different from forums: you should use add new comment to reply to answers, not the Answer box, or else other people will think there's a lot of answers to the same question (I agree, there should exist some warning about this! But don't mind, everybody does this same mistake at first).

I'm not a Mac user, so I can't tell you exactly how to do this stuff, but I suppose it's similar to the PC. In a PC, I would create a DLL (which is a library of routines written in any language, like C, C#, Pascal etc.) with the functions I would need, store it in the Plugins folder of my project and declare these functions in a C# script, like this:

using UnityEngine; using System.Collections; using System.Runtime.InteropServices;

public class RecordSound : MonoBehaviour { [DllImport("DllRecord")] public static extern void RecordToFile(String fileName, double duration);

  void Update(){
      if (Input.GetMouseButtonDown(0)){
          RecordToFile("Sound1.wav", 10f);
      }
  }

} In this example my DLL file is called DllRecord.dll, and I have inside it a function called RecordToFile which records sound during duration seconds and save it to the file fileName. As an example, I placed a simple code in Update that records 10 seconds and save it to Sound1.wav when the left mouse button is clicked.
I believe the process is similar in a Mac - but using the Mac DLL equivalent, which I suppose is dylib, a XCode Dynamic Library.

This whole process may be painful, since in the dylib you must use obscure system functions to record sounds and save files. But maybe you have a simpler solution: I read somewhere that the FMOD plugin for Unity can accept input sounds, and that it works for Mac - but I'm not sure if it can be used in the iPhone. As a plugin, the connection with Unity is probably done like the example above - and I believe the plugin files already include the function declarations, which would greatly easy your job.
Google around for FMOD and Mac, and maybe you find something easier to implement. I'll do some research too, and let you know about what I've found.

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
avatar image
0

Answer by linaMK86 · Aug 06, 2011 at 11:21 AM

Thank you for your answer, really this part of sound is unclear.

1 - From the research I did them, it is the objective-C and this is the first time I use the Mac OS so I have no conaissance in this language. I wonder if you can help me with an example of sound recording and playback that will be guided that I can understand what it is ?

2-Method: I think that in the first step i must have a file with x-code development then we must find a way to integrate this file into unity. It is logical what I just said? In this case, is it necessary to use a DLL file? I'm sorry if I say anything

I am very sorry for the inconvenience I know I ask many questions but just at the beginning that the matter will be clear, I would very much like your advice and your help.

I hope you answer my questions (1 and 2).Thank you

Comment
Add comment · Show 4 · 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 aldonaletto · Aug 06, 2011 at 03:25 PM 0
Share

Please take a look at my answer - I've edited it.

avatar image linaMK86 · Aug 15, 2011 at 10:35 AM 0
Share

thank you aldonaletto

I found a project called SpeakHear with objective-C, it records the sounds with one button and one for playback. I want to repeat what he hears a voice that makes you laugh like $$anonymous$$ cat.

Before doing this I want to know if there is another method with C # because I have no knowledge of objective-C and when I wanted to do the Laison between unity and objective-C I lost myself I found also the editor $$anonymous$$ono I do not know if practicable to use it ... I am very worried.

I still have that two weeks for the submission of the project and I'm still not managed to find the solution

Help me please please

avatar image aldonaletto · Aug 15, 2011 at 11:50 AM 0
Share

Post a link to this project.

avatar image linaMK86 · Aug 16, 2011 at 11:52 AM 0
Share

this is a link: http://developer.apple.com/library/ios/#samplecode/SpeakHere/Introduction/Intro.html

can you help me to create the file. DLLs that you mentioned for this project?

if you test this code you will notice that the voice repeats without change when I want it generates a voice laughing as the case of tom cat.can you tel me how ?

thank you very much.

avatar image
0

Answer by linaMK86 · Aug 08, 2011 at 10:29 AM

thank you very very much aldonaletto you are so gentil, i m very interessted in your advice and i m waiting for more details about this subject.

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
avatar image
0

Answer by linaMK86 · Aug 15, 2011 at 10:34 AM

thank you aldonaletto

I found a project called SpeakHear with objective-C, it records the sounds with one button and one for playback. I want to repeat what he hears a voice that makes you laugh like Tom cat.

Before doing this I want to know if there is another method with C # because I have no knowledge of objective-C and when I wanted to do the Laison between unity and objective-C I lost myself I found also the editor Mono I do not know if practicable to use it ... I am very worried.

I still have that two weeks for the submission of the project and I'm still not managed to find the solution

Help me please please

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 JebarajDaniel · Jul 30, 2013 at 01:22 PM 0
Share

HI lina$$anonymous$$$$anonymous$$86 , Did you find out the solution for this Voice Recording like tom cat. Share with me please.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

talking tom audio record/playback tutorial 1 Answer

IPhone 4 and IPad 2 lost audio on resume 0 Answers

recording sound from external input 0 Answers

Sound format for iPhone/iPad 2 Answers

Voice Recording issue ?? 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