Open MistakingManx opened 6 months ago
I solved this issue by modifying frontend/src/App/api/index.js
and modifying postAudio
to look like so;
export const postAudio = (audio, prompt, uuid) => {
function cleanString(input) {
var output = "";
for (var i=0; i<input.length; i++) {
if (input.charCodeAt(i) <= 127) {
output += input.charAt(i);
}
}
return output;
}
return fetch(apiRoot + `api/audio/?uuid=${uuid}&prompt=${cleanString(prompt)}`, {
method: "POST",
body: audio,
headers: {
"Content-Type": "audio/wav"
}
})
};
However, I worry that this may invalidate my dataset since it's modifying the prompt, which I assume is used for saving.
Describe the bug Occasionally, a prompt includes some strange character
or\u200b
. This results in the error "There was an error in saving that audio", and on the backend;To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Log files
Environment (please complete the following information):
Additional context This is running on a clean development built, as it only says it's not "optimized", and doesn't say "partially non-functional".