From 48e8f4e554e2f6168fb4faf736b25b4016ff8718 Mon Sep 17 00:00:00 2001 From: farfromrefug Date: Mon, 14 Oct 2024 21:56:29 +0200 Subject: [PATCH 1/2] fix: added `--coqui-tts-use-cuda` option --- README.md | 2 ++ generate/coqui_tts.ts | 3 +++ studio_pack_generator.ts | 3 +++ 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 62a15a0..a3d6d46 100644 --- a/README.md +++ b/README.md @@ -253,6 +253,7 @@ Options: -g, --open-ai-model OpenAi model : tts-1, tts-1-hd [default: "tts-1"] -p, --open-ai-voice OpenAi voice : alloy, echo, fable, onyx, nova, shimmer [default: "onyx"] --use-coqui-tts use coqui TTS [default: false] + --use-coqui-tts use coqui TTS [boolean] [default: false] --coqui-tts-model coqui TTS model [default: "tts_models/multilingual/multi-dataset/xtts_v2"] --coqui-tts-language-idx coqui TTS language_idx [default: "fr"] --coqui-tts-speaker-idx coqui TTS speaker_idx [default: "Abrahan Mack"] @@ -412,6 +413,7 @@ File format (all the properties are optionals) : "rssEpisodeNumbers": false, "useCoquiTts": false, "coquiTtsModel": "tts_models/multilingual/multi-dataset/xtts_v2", + "coquiUseCuda": false, "coquiTtsLanguageIdx": "fr", "coquiTtsSpeakerIdx": "Abrahan Mack", "port": 5555, diff --git a/generate/coqui_tts.ts b/generate/coqui_tts.ts index a50c7e3..173e0f7 100644 --- a/generate/coqui_tts.ts +++ b/generate/coqui_tts.ts @@ -33,6 +33,9 @@ export async function generate_audio_with_coqui( if (opt.coquiTtsLanguageIdx) { cmd.push("--language_idx", opt.coquiTtsLanguageIdx); } + if (opt.coquiTtsUseCuda) { + cmd.push("--use_cuda", "1"); + } if (opt.coquiTtsSpeakerIdx) { cmd.push("--speaker_idx", opt.coquiTtsSpeakerIdx); } diff --git a/studio_pack_generator.ts b/studio_pack_generator.ts index 257833c..cfcf571 100755 --- a/studio_pack_generator.ts +++ b/studio_pack_generator.ts @@ -141,6 +141,9 @@ export class StudioPackGenerator { @help("use coqui TTS") useCoquiTts = false; + @help("use coqui TTS") + coquiTtsUseCuda = false; + @help("coqui TTS model") coquiTtsModel = "tts_models/multilingual/multi-dataset/xtts_v2"; From 750be02af788f31a348d2339e2724dfc3cbc0c12 Mon Sep 17 00:00:00 2001 From: Jerem Date: Tue, 15 Oct 2024 06:59:05 +0200 Subject: [PATCH 2/2] fix: added `--coqui-tts-use-cuda` option: fix the help --- README.md | 2 +- studio_pack_generator.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a3d6d46..c61b842 100644 --- a/README.md +++ b/README.md @@ -253,7 +253,7 @@ Options: -g, --open-ai-model OpenAi model : tts-1, tts-1-hd [default: "tts-1"] -p, --open-ai-voice OpenAi voice : alloy, echo, fable, onyx, nova, shimmer [default: "onyx"] --use-coqui-tts use coqui TTS [default: false] - --use-coqui-tts use coqui TTS [boolean] [default: false] + --coqui-tts-use-cuda enable CUDA in coqui TTS [default: false] --coqui-tts-model coqui TTS model [default: "tts_models/multilingual/multi-dataset/xtts_v2"] --coqui-tts-language-idx coqui TTS language_idx [default: "fr"] --coqui-tts-speaker-idx coqui TTS speaker_idx [default: "Abrahan Mack"] diff --git a/studio_pack_generator.ts b/studio_pack_generator.ts index cfcf571..c0b1be1 100755 --- a/studio_pack_generator.ts +++ b/studio_pack_generator.ts @@ -141,7 +141,7 @@ export class StudioPackGenerator { @help("use coqui TTS") useCoquiTts = false; - @help("use coqui TTS") + @help("enable CUDA in coqui TTS") coquiTtsUseCuda = false; @help("coqui TTS model")