Voice recording/playing

Hello,

There is some way to record an audio note and then play it back inside the application (I'm developing my app with Unity).

I have seen that you can use the input voice to translate it to text. But in my application I need to save the audio note, to be listened from another place.

Any way to this?

Thank you!

Tagged:

Best Answer

  • edited October 23 Accepted Answer

    Yes there is. You have two options either use the Unity's own Microphone class or use the MicStream in Holotoolkit (pretty sure they also have a demo script).

    Both have their ups and down. If you use MicStream you can choose where to save your files and I've noticed that they have the incorrect file format when they're saving file so I wasn't able to read them directly. I stored all the audio data in a buffer and wrote it to disk using async version of OpenWav asset on unity store. Another annoying thing about MicStream is that it play the recording through the speakers, I was not able to stop it from outputting it, and that is very disorientating.

    Let me know if you have any questions. I just did this and was appalled by how little documentation there is. But it wouldn't be a MS product otherwise.

Answers

  • edited October 23 Accepted Answer

    Yes there is. You have two options either use the Unity's own Microphone class or use the MicStream in Holotoolkit (pretty sure they also have a demo script).

    Both have their ups and down. If you use MicStream you can choose where to save your files and I've noticed that they have the incorrect file format when they're saving file so I wasn't able to read them directly. I stored all the audio data in a buffer and wrote it to disk using async version of OpenWav asset on unity store. Another annoying thing about MicStream is that it play the recording through the speakers, I was not able to stop it from outputting it, and that is very disorientating.

    Let me know if you have any questions. I just did this and was appalled by how little documentation there is. But it wouldn't be a MS product otherwise.

  • Hello @dontHurtMeNow ,

    OK, I see that in the holotoolkit package I have the MicStream script, but I don't know how I can use it. Can you show me the steps to follow please?

    Thank you very much!

  • Don't think I can do that since I don't know what you're making. Here's the MicStreamDemo it shows how it can be used. Be sure to enable mic capabilities in player settings. Read the MicStream file it's pretty documented. If you're just looking for a limited duration of audio log I would then use unity's Microphone class. It's simpler and needs less management.

  • As far as I knew, Windows has a default feature for users to record audio on computer.

Sign In or Register to comment.