From 1a4590098c25d199d2836055be12fc1113e007fb Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 18 Jan 2020 15:58:05 +0000 Subject: [PATCH] Fix using the mbrola voices in Windows Subsystem for Linux. --- src/libespeak-ng/mbrowrap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libespeak-ng/mbrowrap.c b/src/libespeak-ng/mbrowrap.c index 71d6bb19..0fba949e 100644 --- a/src/libespeak-ng/mbrowrap.c +++ b/src/libespeak-ng/mbrowrap.c @@ -527,6 +527,11 @@ static int init_mbrola(char *voice_path) if (error) return -1; + // Allow mbrola time to start when running on Windows Subsystem for + // Linux (WSL). Otherwise, the receive_from_mbrola call to read the + // wav header from mbrola will fail. + usleep(100); + result = send_to_mbrola("#\n"); if (result != 2) { stop_mbrola();