Unity Canceling Audio Processing Thread

Original Discord Post by john30ninja | 2024-10-29 17:28:51

Everything was working fine and suddenly I’m seeing issues with processing microphone audio data. The microphone checker script reports that everything is ok. The input manager seems to open and close the mic, but while the mic is open I get this error. Any ideas?

[Error][Character]: System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Convai.Scripts.Runtime.Core.ConvaiGRPCAPI.ProcessAudioChunk (Grpc.Core.AsyncDuplexStreamingCall2[TRequest,TResponse] call, System.Int32 diff, System.Collections.Generic.IReadOnlyList1[T] audioData) [0x0011e] in D:\30 Ninjas\SpaceHeist\Packages\com.thirtyninjas.convai\Runtime\Core\ConvaiGRPCAPI.cs:466

Convai.Scripts.Runtime.Core.ConvaiGRPCAPI/d__21:MoveNext () (at D:/30 Ninjas/SpaceHeist/Packages/com.thirtyninjas.convai/Runtime/Core/ConvaiGRPCAPI.cs:497)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Convai.Scripts.Runtime.Core.ConvaiGRPCAPI/d__21> (Convai.Scripts.Runtime.Core.ConvaiGRPCAPI/d__21&)
Convai.Scripts.Runtime.Core.ConvaiGRPCAPI:ProcessAudioChunk (Grpc.Core.AsyncDuplexStreamingCall2<Service.GetResponseRequest, Service.GetResponseResponse>,int,System.Collections.Generic.IReadOnlyList1)
Convai.Scripts.Runtime.Core.ConvaiGRPCAPI/d__19:MoveNext () (at D:/30 Ninjas/SpaceHeist/Packages/com.thirtyninjas.convai/Runtime/Core/ConvaiGRPCAPI.cs:408)

Reply by k3kalinix | 2024-10-29 18:19:01

Hello <@1300853590721564722> :wave:t2:,

Reply by k3kalinix | 2024-10-29 18:19:29

Could you please share a screenshot?

Reply by k3kalinix | 2024-10-29 18:24:17

Actually this is not an error.

Reply by k3kalinix | 2024-10-29 18:24:53

Are you spamming the talk button?

Reply by k3kalinix | 2024-10-29 18:26:00

I removed the screenshot, your API key was there.

Reply by john30ninja | 2024-10-29 18:27:37

I don’t think so, but it’s possible. I’m noticing that our daily usage is maxed out at 100 interactions.

Reply by john30ninja | 2024-10-29 18:28:31

I assume that would prevent a response? Does any error or warning get shown for that?

Reply by k3kalinix | 2024-10-29 18:29:14

Yes, there should be. Can you check other logs?

Reply by john30ninja | 2024-10-29 18:30:44

I don’t see anything suggesting we’re at the daily max. It does show in the setup window though.

Reply by k3kalinix | 2024-10-29 18:32:08

I see, there are too many logs. Maybe you missed it.

Reply by john30ninja | 2024-10-29 18:34:37

Definitely nothing showing. Can you check our account?

Reply by john30ninja | 2024-10-29 18:34:56

We’re a Solutions Partner level.

Reply by k3kalinix | 2024-10-29 18:35:37

Could you please test on the Playground?

Reply by john30ninja | 2024-10-29 18:35:49

Oh, yes, that’s easy

Reply by john30ninja | 2024-10-29 18:36:22

I get a response there. So, unlikely that.

Reply by k3kalinix | 2024-10-29 18:36:38

And keep in mind, we don’t have a daily quota.

Replying to john30ninja’s Message

Reply by john30ninja | 2024-10-29 18:36:22
I get a response there. So, unlikely that.

Reply by k3kalinix | 2024-10-29 18:38:16

Could you please test it on our demo scene?

Reply by john30ninja | 2024-10-29 18:39:09

Yes… I’ll set it up

Reply by john30ninja | 2024-10-29 18:43:41

Interesting… I thought for sure that’d work. I set the API key and character ID. It takes the microphone input and successfully converts to text in the UI, but the AI doesn’t provide a response.