Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Mic Stream Demo Error - Latest Unity Toolkit, Unity 5.5

Hello everyone,

I am trying to add the ability to record audio notes to a project. Saving the input from the microphone as a wav would be ideal, as is done in the MicrophoneStream test scene.

I have tested the MicrophoneStream scene in a clean project with Unity 5.5.0p4 I am able to stream and listen to the mic however when I call StartAudioRecording() I get an Exception thrown:

Exception thrown: 'System.Runtime.InteropServices.SEHException' in Assembly-CSharp.dll SEHException: External component has thrown an exception. at HoloToolkit.Unity.InputModule.MicStream.MicStartRecording(String filename, Boolean previewOnDevice) at HoloToolkit.Unity.InputModule.Tests.MicStreamDemo.StartAudioRecording() at UnityEngine.Events.InvokableCall.Invoke(Object[] args) at UnityEngine.Events.InvokableCallList.Invoke(Object[] parameters) at HoloToolkit.Unity.InputModule.KeywordManager.KeywordRecognizer_OnPhraseRecognized(PhraseRecognizedEventArgs args) at UnityEngine.Windows.Speech.PhraseRecognizer.InvokePhraseRecognizedEvent(String text, ConfidenceLevel confidence, SemanticMeaning[] semanticMeanings, Int64 phraseStartFileTime, Int64 phraseDurationTicks) at UnityEngine.Windows.Speech.PhraseRecognizer.$Invoke6(Int64 instance, Int64* args) at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method) (Filename: <Unknown> Line: 0)

Has anyone else encountered this issue or been able to use MicStream?

Thank you

Best Answer

Answers

  • Options

    Thanks for the response @DavidKlineMS I appreciate it!

    The issue was first with my own project then I tested the sample as well when it did not work. The DLL is there. I have tested it in 5.5.0p4 and 5.6.0b3

    Ill give it a go in 5.5.1 this week, if you have any other suggestions id love to try them as well.

    Thanks again,

    -Jacob

  • Options
    CrowCrow
    edited March 2017

    Hi,
    I'm also getting the error with the MicrophoneStream demo too when I start recording.

    It was happening in the version of HoloToolkit we were using in our own project but to test I grabbed the latest version of the HoloTool Kit this morning and built the MicrophoneStream scene from that. The demo builds and works fine initially streaming from the Mic (which the original poster said was OK) but if you then go into the Awake function and comment the MicStartStream line and swap it with a MicStartRecording call like below:

    if (AutomaticallyStartStream == true)
    {
       //CheckForErrorOnCall(MicStream.MicStartStream(KeepAllData, false));
       CheckForErrorOnCall(MicStream.MicStartRecording(SaveFileName, false));
    }
    

    You get the following error:
    SEHException: External component has thrown an exception.
    at HoloToolkit.Unity.InputModule.MicStream.MicStartRecording(String filename, Boolean previewOnDevice)
    at HoloToolkit.Unity.InputModule.Tests.MicStreamDemo.Awake()
    at HoloToolkit.Unity.InputModule.Tests.MicStreamDemo.$Invoke0(Int64 instance, Int64* args)
    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    (Filename: Line: 0)

    You still get this error even if you defer the MicStartRecording call until the Update function. Is there some more initialisation needed for recording which is not present?

    BTW triggering the microphone recording works when running the our app or the HoloToolKit MicrophoneStream demo scene on PC. These successfully save to Username/Music/MicStreamRecordings, this seems to be a specific issue with MicStartRecording when deployed to the HoloLens.

    I've got the LocatableCamera saving images and videos to files all working fine and would like to get microphone recording working too.

  • Options
    NonlinNonlin
    edited March 2017

    Similar Issue, although I'm not getting any error message it just Crashes Unity all together but the root cause seems to be with Start Recording.

Sign In or Register to comment.