This commit is contained in:
Georgi Gerganov
2023-03-26 19:30:56 +03:00
parent 66fc4010c2
commit c353100bad
2 changed files with 5 additions and 2 deletions

View File

@ -13,5 +13,5 @@
#
wd=$(dirname $0)
script=$wd/eleven-labs.py
python3 $script $1 "$2"
ffplay -autoexit -nodisp -loglevel quiet -hide_banner -i ./audio.mp3
python3 $script $1 "$2" >/dev/null 2>&1
ffplay -autoexit -nodisp -loglevel quiet -hide_banner -i ./audio.mp3 >/dev/null 2>&1

View File

@ -317,6 +317,8 @@ int main(int argc, char ** argv) {
printf("%s%s", params.person.c_str(), chat_symb.c_str());
fflush(stdout);
audio.clear();
const int n_keep = embd_inp.size();
const int voice_id = 2;
@ -490,6 +492,7 @@ int main(int argc, char ** argv) {
}
}
text_to_speak = ::replace(text_to_speak, "\"", "");
system((params.speak + " " + std::to_string(voice_id) + " \"" + text_to_speak + "\"").c_str());
audio.clear();