-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add supported devices * Add: supported devices * Add
- Loading branch information
Showing
3 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# voicevox-client - supported devices | ||
|
||
from typing import Dict | ||
|
||
|
||
class SupportedDevices: | ||
"""Supported devices | ||
Attributes | ||
---------- | ||
cpu : bool | ||
Check cpu support | ||
cuda : bool | ||
Check cuda support | ||
dml : bool | ||
Check directml support | ||
""" | ||
def __init__(self, payload: Dict[str, bool]): | ||
self.__data = payload | ||
|
||
@property | ||
def cpu(self) -> bool: | ||
return self.__data["cpu"] | ||
|
||
@property | ||
def cuda(self) -> bool: | ||
return self.__data["cuda"] | ||
|
||
@property | ||
def dml(self) -> bool: | ||
return self.__data["dml"] |