Closed RenNagasaki closed 4 months ago
Just found out that the resulting .wav file can't be played via WMP. VLC works but not WMP. Any ideas why?
An online file analyzer gets this from the file:
I've got it all sorted out now.
Finished code for others who are interested:
`var uriBuilder = new UriBuilder(UrlBase) { Path = Path }; var query = HttpUtility.ParseQueryString(uriBuilder.Query); query["text"] = text; query["voice"] = voice + ".wav"; query["language"] = getAlltalkLanguage(language); query["output_file"] = "ignoreme.wav"; //query["autoplay"] = "true"; uriBuilder.Query = query.ToString();
using (var wc = new System.Net.WebClient()) { wc.Proxy = null; var stream = wc.OpenRead(uriBuilder.Uri); var s = new RawSourceWaveStream(stream, new WaveFormat(24000, 16, 1)); var soundOut = new WasapiOut(); //soundOut.PlaybackStopped += (, ) => { this.speechCompleted.Set(); }; soundOut.Init(s); soundOut.Volume = volume; soundOut.Play(); }`
@erew123 Sorry to impose on you again. I'm currently trying to use your streaming endpoint -> http://localhost:7851/api/tts-generate-streaming I successfully managed to request a generation but I fail to play the generated file.![image](https://github.com/erew123/alltalk_tts/assets/10595885/a01d384c-9118-4f5f-a364-c2c4dc38f0e4)
When I open the url manually I get a small Audio Player, could this be the issue?
Is there like a raw endpoint which just returns the audio stream?