Health/Assets/_VoiceAssistant/Scripts/Voice/Azure/PullAudioStream.cs

15 lines
435 B
C#

using Microsoft.CognitiveServices.Speech.Audio;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PullAudioStream : PullAudioInputStreamCallback
{
public override int Read(byte[] dataBuffer, uint size)
{
//int length = AudioRecorder.Instance.ReadPCM(dataBuffer, size);
int length = _AudioRecorderTest.Instance.ReadPCM(dataBuffer, size);
return length;
}
}