Ability to run the Coqui TTS extension on the CPU (#5365)
This commit is contained in:
parent
828be63f2c
commit
69622930c7
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import json
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
import torch
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import gradio as gr
|
import gradio as gr
|
||||||
|
@ -23,7 +24,7 @@ params = {
|
||||||
"voice": "female_01.wav",
|
"voice": "female_01.wav",
|
||||||
"language": "English",
|
"language": "English",
|
||||||
"model_name": "tts_models/multilingual/multi-dataset/xtts_v2",
|
"model_name": "tts_models/multilingual/multi-dataset/xtts_v2",
|
||||||
"device": "cuda"
|
"device": "cuda" if torch.cuda.is_available() else "cpu"
|
||||||
}
|
}
|
||||||
|
|
||||||
this_dir = str(Path(__file__).parent.resolve())
|
this_dir = str(Path(__file__).parent.resolve())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue