whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

Escape Windows path seperator in JSON output

Open graham-walker opened this issue 1 year ago • 1 comments

When setting the model path on Windows using Windows path separators, the separator character is not escaped in the JSON output, resulting in invalid JSON. This issue is present in the 1.3.0 release.

Running: main --language english --model "D:\whisper.cpp 1.3.0\ggml-tiny.bin" --file "D:\whisper.cpp 1.3.0\audio_sample.wav" --output-file "D:\whisper.cpp 1.3.0\output" --output-json

Results in the following invalid output in output.json:

"params": {
  "model": "D:\whisper.cpp 1.3.0\ggml-tiny.bin",
  "language": "english",
  "translate": false
},

graham-walker avatar Apr 15 '23 22:04 graham-walker

Hi! I would love to contribute to the repo. I saw that the issue is labelled "first time", which is perfect for me as I am new to this project and eager to get started. Could you please assign this issue to me?

tauseefmohammed2 avatar Apr 16 '23 09:04 tauseefmohammed2