Skip to main content
mousebear
Honored Contributor
October 27, 2021

Voice SDK (Feedback/Issues)

  • October 27, 2021
  • 100 replies
  • 54547 views

Do you have any feedback and/or issues in regards to the Voice SDK? Use this place to discuss, as we'll have members of the team reviewing this thread!

 

Read the blog on Presence Platform (of which the Voice SDK is a part of) here: https://developer.oculus.com/blog/introducing-presence-platform-unleashing-mixed-reality-and-natural-interaction-for-oculus-developers/

    100 replies

    New Participant
    August 3, 2024

    Sometimes I get this error whenever I want to switch scene 
    "Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
    The following scene GameObjects were found:
    AudioBuffer"
    Is there a way to fix this?

    New Participant
    August 18, 2024

    Hi,

    I have a Meta Quest application that implements an OpenAI SDK; it captures audio using the microphone and transcribes (STT) it using Open AI. The application was working fine until it wasn't. The application stopped working after the Meta All-In-One SDK was upgraded from v65 to v67. Since I am using Unity's VCS I was able to revert to a previous version of the application before the upgrade and everything works as expected. There were no changes to the code other than the updated SDK; is this a bug? Or is there a different way to capture the microphone in v67?

    simonmersus
    Participant
    August 22, 2024

    I'm using the Voice SDK solely for the Text-To-Speech feature in my app, in combination with prepared voicelines depending on the context. I was profiling my application and realized I had a memory leak due to AudioClips. I managed to fix the issues related to my implementation of reading Voiceline files but now I am left with all the clips created by TTS. I've a TTS Manager game object with the speaker, TTSWit and TTSRuntimeCache attached and tried to play with the RuntimeCache settings but nothing seems to have any sort of effect, whether it's the clip number limit or the RAM limit. Whatever I do, TTS clips all stay in memory forever. The speaker does not have any clearly defined function to "clean itself up" that I can call and other classic Unity techniques like Resources.UnloadUnusedAssets do not affect them. My implementation of it is pretty basic though so I might be missing something (basically using mostly Speaker.Speak and Speaker.Stop). If anyone has an idea, I'll take it!

     

    EDIT: Looking for a solution to this, I've been profiling the TTSVoices sample scene and found the same result as in my own implementation. How can we raise this issue ? Surely that's not the intended behaviour. Here is a comparative screenshot from that scene after about 30 minutes of TTS usage where we can see that we've accumulated 2.2GB of Audioclips in memory.

     

    New Participant
    September 9, 2024

    Tbh, i just stopped using the Meta Voice SDKs for development and use OpenAIs + Eleven Labs for TTS. Figured i would pivot back to the Voice SDKs when I had a large economic reason to. 

    Up and Coming
    September 9, 2024

    Ok I just figured it out as there is some limit in characters (about 200?), so the best is to simply chunk your result and pass it along queued.

    Inspiring
    September 9, 2024

    Yeah I came to the same conclusion. I think that’s just how Wit.AI is designed. Chunking is the answer. Would share code but I haven’t implemented it yet 😅

    Up and Coming
    September 12, 2024

    Yeah the issue is that this is not mentioned anywhere in the documentation as far as I can tell.

    Inspiring
    September 12, 2024

    I didn’t see it either. The Wit.AI and the Voice SDK documentation is in need of updating 

    Inspiring
    September 24, 2024

    Hello, I am following the tutorial for enabling app voice experiences with built-in NLP:
    https://developers.meta.com/horizon/documentation/unity/voice-sdk-tutorials-1

    I am at step 4.1 where I enter the Utterance in the Understanding Viewer. When I click send, I get the following error msg:

    [VSDK] [Requests] [VoiceRequest.cs:328] OnComplete Exception Caught
     
    UnityEngine.UnityException: Repaint can only be called from the main thread.
    Constructors and field initializers will be executed from the loading thread when loading a scene.
    Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
      at (wrapper managed-to-native) UnityEditor.GUIView.Repaint(UnityEditor.GUIView)
      at UnityEditor.EditorWindow.Repaint () [0x00027] in <999670adb4c84ac4bad3ce4f6391c9c9>:0 
      at Meta.WitAi.Windows.WitUnderstandingViewer.OnComplete (Meta.WitAi.Requests.VoiceServiceRequest request) [0x0006c] in .\Library\PackageCache\com.meta.xr.sdk.voice@67.0.0\Lib\Wit.ai\Scripts\Editor\Utility\WitUnderstandingViewer.cs:406 
      at UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) [0x00010] in <55fbbbd17b724c15b6abe8c1a3e3289c>:0 
      at UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) [0x00025] in <55fbbbd17b724c15b6abe8c1a3e3289c>:0 
      at Meta.WitAi.Requests.VoiceServiceRequest.RaiseEvent (Meta.WitAi.Requests.VoiceServiceRequestEvent eventCallback) [0x00000] in .\Library\PackageCache\com.meta.xr.sdk.voice@67.0.0\Lib\Wit.ai\Scripts\Runtime\Requests\VoiceServiceRequest.cs:114 
      at Meta.Voice.VoiceRequest`4[TUnityEvent,TOptions,TEvents,TResults].OnComplete () [0x00000] in .\Library\PackageCache\com.meta.xr.sdk.voice@67.0.0\Lib\Wit.ai\Lib\Wit\Runtime\Requests\VoiceRequest.cs:540 
      at Meta.Voice.VoiceRequest`4[TUnityEvent,TOptions,TEvents,TResults].SetState (Meta.Voice.VoiceRequestState newState) [0x000ec] in .\Library\PackageCache\com.meta.xr.sdk.voice@67.0.0\Lib\Wit.ai\Lib\Wit\Runtime\Requests\VoiceRequest.cs:230  [f793bba4-998b-4eb5-8bd4-48e4bdf38247]
    === STACK TRACE ===
    [VoiceRequest.cs:328] VoiceRequest`4.Log(String, VLoggerVerbosity)
    [VoiceRequest.cs:331] VoiceRequest`4.LogE(String, Exception)
    [VoiceRequest.cs:234] VoiceRequest`4.SetState(VoiceRequestState)
    [NLPRequest.cs:77] NLPRequest`5.SetState(VoiceRequestState)
    [WitUnityRequest.cs:83] WitUnityRequest.SetState(VoiceRequestState)
    [VoiceRequest.cs:491] VoiceRequest`4.HandleSuccess()
    [NLPRequest.cs:333] NLPRequest`5.ApplyResponseData(WitResponseNode, Boolean)
    [VoiceServiceRequest.cs:97] VoiceServiceRequest.ApplyResponseData(WitResponseNode, Boolean)
    [NLPRequest.cs:245] NLPRequest`5.ApplyDecodedResponseData(WitResponseNode)
    [NLPRequest.cs:214] <>c__DisplayClass27_0.<DecodeAsync>b__0()
     
    UnityEngine.Debug:LogError (object)
    Meta.Voice.Logging.UnityLogWriter:WriteError (string) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/UnityLogWriter.cs:46)
    Meta.Voice.Logging.LogSink:WriteError (string) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/LogSink.cs:389)
    Meta.Voice.Logging.LogSink:SendEntryToLogWriter (Meta.Voice.Logging.LogEntry) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/LogSink.cs:177)
    Meta.Voice.Logging.LogSink:WriteEntry (Meta.Voice.Logging.LogEntry) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/LogSink.cs:162)
    Meta.Voice.Logging.VLogger:Write (Meta.Voice.Logging.LogEntry,bool) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/VLogger.cs:462)
    Meta.Voice.Logging.VLogger:LogEntry (Meta.Voice.Logging.LogEntry) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/VLogger.cs:264)
    Meta.Voice.Logging.VLogger:Log (Meta.Voice.Logging.CorrelationID,Meta.Voice.Logging.VLoggerVerbosity,string,object[]) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Utilities/Logging/VLogger.cs:231)
    Meta.Voice.VoiceRequest`4<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults>:Log (string,Meta.Voice.Logging.VLoggerVerbosity) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/VoiceRequest.cs:328)
    Meta.Voice.VoiceRequest`4<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults>:LogE (string,System.Exception) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/VoiceRequest.cs:331)
    Meta.Voice.VoiceRequest`4<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults>:SetState (Meta.Voice.VoiceRequestState) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/VoiceRequest.cs:234)
    Meta.Voice.NLPRequest`5<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults, Meta.WitAi.Json.WitResponseNode>:SetState (Meta.Voice.VoiceRequestState) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/NLP/NLPRequest.cs:77)
    Meta.WitAi.Requests.WitUnityRequest:SetState (Meta.Voice.VoiceRequestState) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Scripts/Runtime/Requests/WitUnityRequest.cs:83)
    Meta.Voice.VoiceRequest`4<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults>:HandleSuccess () (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/VoiceRequest.cs:491)
    Meta.Voice.NLPRequest`5<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults, Meta.WitAi.Json.WitResponseNode>:ApplyResponseData (Meta.WitAi.Json.WitResponseNode,bool) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/NLP/NLPRequest.cs:333)
    Meta.WitAi.Requests.VoiceServiceRequest:ApplyResponseData (Meta.WitAi.Json.WitResponseNode,bool) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Scripts/Runtime/Requests/VoiceServiceRequest.cs:97)
    Meta.Voice.NLPRequest`5<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults, Meta.WitAi.Json.WitResponseNode>:ApplyDecodedResponseData (Meta.WitAi.Json.WitResponseNode) (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/NLP/NLPRequest.cs:245)
    Meta.Voice.NLPRequest`5/<>c__DisplayClass27_0<Meta.WitAi.Requests.VoiceServiceRequestEvent, Meta.WitAi.Configuration.WitRequestOptions, Meta.WitAi.Requests.VoiceServiceRequestEvents, Meta.WitAi.Requests.VoiceServiceRequestResults, Meta.WitAi.Json.WitResponseNode>:<DecodeAsync>b__0 () (at ./Library/PackageCache/com.meta.xr.sdk.voice@67.0.0/Lib/Wit.ai/Lib/Wit/Runtime/Requests/NLP/NLPRequest.cs:214)
    System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()


    I am currently usingt Unity 2022.3 LTS and latest version of Meta SDK's. I would be grateful for some guidance on how to fix this error.

    Up and Coming
    November 12, 2024


    I am trying to understand how to use the Dictation feature of the Voice SDK in languages other than English. I think I can set the default to a language and maybe change the configuration? Not sure. Also how could I have more than one language active? I would like it to detect and understand different languages, or at worst be able to change from some menu setting at runtime.

    New Participant
    November 12, 2024

    The voice sdk is controlled by wit.ai which lets you select only one language at a time for each app... I think that you need to do different scenes connected to different wit.ai configurations

    Up and Coming
    November 12, 2024

    Also for reference even if I try another WitConfiguration in another language (Spanish or Italian) the Dication doesn't work. Switching to English works fine but it doesn't seem to like configurations other than English (assigned to the AppDicationExperience.cs)

    New Participant
    December 5, 2024

    I get the following error when trying to load Unity (Unity 6) in WebGL in a project that also has this package as a dependency (a dependency of a dependency..):
    Library\PackageCache\com.meta.xr.sdk.voice\Lib\Wit.ai\Scripts\Runtime\WitRequest.cs(374,17): error CS0103: The name '_log' does not exist in the current context

    If you open the file, you can see that the word _log is only in one place in the whole file, inside of an #if directive for WebGL, and removing that line (or updating it with Logger.Warning call instead of _log.Warning) resolves the issue. This has persisted for at least 2 versions, I think. Can we please get this issue resolved in the next patch version?

     

    Edit: Upon doing a build I also received a few more errors, actually.