If I understand your question, you want to use voice with LUIS, Microsoft Learn has an example (search "c# luis voice intent example")
https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/how-to-recognize-intents-from-speech-csharp
here is an example of a console app (Net 5.0) that uses continuous speech,
it captures the string and json output.
You get the appID, key region and Intent Name form LUIS
string intentResultString ="";
string intentJSON = "";
var config = SpeechConfig.FromSubscription("key", "westus");
using (var recognizer = new IntentRecognizer(config))
{
var model = LanguageUnderstandingModel.FromAppId("AppID");
recognizer.AddIntent(model, "Intent Name", "id1");
// Subscribes to events.
recognizer.Recognizing += (s, e) =>
{
};
recognizer.Recognized += (s, e) =>
{
intentResultString += e.Result.Text;
intentJSON += e.Result.Properties.GetProperty(PropertyId.LanguageUnderstandingServiceResponse_JsonResult);
};
recognizer.Canceled += (s, e) =>
{
Console.WriteLine($"\n Canceled. Reason: {e.Reason.ToString()}, CanceledReason: {e.Reason}");
};
recognizer.SessionStarted += (s, e) =>
{
Console.WriteLine("\n Session started event.");
};
recognizer.SessionStopped += (s, e) =>
{
Console.WriteLine("\n Session stopped event.");
};
// Starts continuous recognition.
// Uses StopContinuousRecognitionAsync() to stop recognition.
await recognizer.StartContinuousRecognitionAsync().ConfigureAwait(false);
do
{
} while (Console.ReadKey().Key != ConsoleKey.Enter);
// Stops recognition.
await recognizer.StopContinuousRecognitionAsync().ConfigureAwait(false);
}
}
#endregion
}
hope this helps