I try to create a Text-To-Speech service in windows. The API should be exposed using a REST API. Unfortunately I only find examples using ASP.NET. Is it possible to create such a service without the use of ASP. Any hints or examples would be much appreciated.
I searched both google and stackoverflow; but could not find information or examples to achieve this.
You can view the Networking\Writing an HTTP Server
chapter in brothers' Albahari "C# 7.0 in a Nutshell" book.
It would be something like
HttpListener listener = new HttpListener();
listener.Prefixes.Add ("http://localhost:51111/MyApp/"); // Listen on 51111
listener.Start();
But it's definetly not the easiest way to do so. You'll have to write too much low-level code.
Just use web API with ASP.NET Core MVC. You can find more information here: https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-2.2&tabs=visual-studio
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With