Update openvoice/api.py
Browse files- openvoice/api.py +2 -2
openvoice/api.py
CHANGED
@@ -15,8 +15,8 @@ class OpenVoiceBaseClass(object):
|
|
15 |
def __init__(self,
|
16 |
config_path,
|
17 |
device='cuda:0'):
|
18 |
-
|
19 |
-
|
20 |
|
21 |
hps = utils.get_hparams_from_file(config_path)
|
22 |
|
|
|
15 |
def __init__(self,
|
16 |
config_path,
|
17 |
device='cuda:0'):
|
18 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
+
print(f"Using device: {device}")
|
20 |
|
21 |
hps = utils.get_hparams_from_file(config_path)
|
22 |
|