Skip to content
Discussion options

You must be logged in to vote

Hi @tlierdotfr

Here is a sample app I wrote awhile back that uses the InvokeModelWithBidirectionalStreamAsync API and the NAudio.Wave NuGet package for handling the audio input and output. Keep in mind with the audio stuff I have only tested it on my laptop and I wouldn't say the code is the most durable. But hopefully it shows how to publish and receive events using the InvokeModelWithBidirectionalStreamAsync API. The app is a console .NET 8 app but due to the use of NAudio.Wave it is restricted to Windows.

Program.cs

using System.Text;
using System.Text.Json;
using NAudio.Wave;

using Amazon;
using Amazon.BedrockRuntime.Model;
using Amazon.BedrockRuntime;
using Amazon.Runtime.EventStreams;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tlierdotfr
Comment options

Answer selected by tlierdotfr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants