File tree Expand file tree Collapse file tree
tests/BotSharp.Test.RealtimeVoice Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ internal class AudioOut : IDisposable
1212 private readonly BufferedWaveProvider _waveProvider ;
1313 private readonly WaveOutEvent _waveOutEvent ;
1414
15- public AudioOut ( )
15+ private AudioOut ( )
1616 {
1717 var audioFormat = new WaveFormat (
1818 rate : SAMPLE_RATE ,
@@ -33,6 +33,8 @@ public AudioOut()
3333 _waveOutEvent . Play ( ) ;
3434 }
3535
36+ public static AudioOut Init ( ) => new ( ) ;
37+
3638 public void Enqueue ( BinaryData data )
3739 {
3840 var buffer = data ? . ToArray ( ) ?? [ ] ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ private async Task StartCustomStreamAsync(string agentId)
1414 DisplayRemarks ( ) ;
1515
1616 var ( hub , conversationId ) = await Setup ( agentId ) ;
17- var audioOut = new AudioOut ( ) ;
17+ var audioOut = AudioOut . Init ( ) ;
1818
1919 await hub . ConnectToModel (
2020 responseToUser : async data =>
You can’t perform that action at this time.
0 commit comments