A fast, local neural text to speech system
Fix for raw audio output on Windows
Michael Hansen91b8d422c11e
diff --git a/src/cpp/main.cpp b/src/cpp/main.cppindex 962ca47..045db78 100644--- a/src/cpp/main.cpp+++ b/src/cpp/main.cpp@@ -18,6 +18,11 @@#include <windows.h>#endif+#ifdef _WIN32+ #include <io.h>+ #include <fcntl.h>+#endif+#ifdef __APPLE__#include <mach-o/dyld.h>#endif@@ -307,6 +312,12 @@ int main(int argc, char *argv[]) {vector<int16_t> audioBuffer;vector<int16_t> sharedAudioBuffer;+#ifdef _WIN32+ // Needed on Windows to avoid terminal conversions+ setmode(fileno(stdout),O_BINARY);+ setmode(fileno(stdin),O_BINARY);+#endif+thread rawOutputThread(rawOutputProc, ref(sharedAudioBuffer),ref(mutAudio), ref(cvAudio), ref(audioReady),ref(audioFinished));