ref: 9a7f3e4a3db4792f16a5d32f65d7e48891866e90
parent: eeb7615bd768094b993cdf373cfc0b87b29c42d8
author: Marcus Asteborg <maastebo@microsoft.com>
date: Sat Aug 1 18:20:27 EDT 2020
Open files in binary mode to enable dump_data to work properly on Windows
--- a/dnn/dump_data.c
+++ b/dnn/dump_data.c
@@ -171,7 +171,7 @@
fprintf(stderr,"Error opening input .s16 16kHz speech input file: %s\n", argv[2]);
exit(1);
}
- ffeat = fopen(argv[3], "w");
+ ffeat = fopen(argv[3], "wb");
if (ffeat == NULL) {
fprintf(stderr,"Error opening output feature file: %s\n", argv[3]);
exit(1);
@@ -194,7 +194,7 @@
return 0;
}
if (training) {
- fpcm = fopen(argv[4], "w");
+ fpcm = fopen(argv[4], "wb");
if (fpcm == NULL) {
fprintf(stderr,"Error opening output PCM file: %s\n", argv[4]);
exit(1);
--
⑨