You've already forked HeurAMS-Legacy
style: 代码格式化
This commit is contained in:
@@ -8,5 +8,5 @@ __all__ = [
|
||||
|
||||
providers = {
|
||||
"basetts": BaseTTS,
|
||||
"edgetts": EdgeTTS,
|
||||
}
|
||||
"edgetts": EdgeTTS,
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import pathlib
|
||||
|
||||
|
||||
class BaseTTS:
|
||||
name = "BaseTTS"
|
||||
|
||||
|
||||
@classmethod
|
||||
def convert(cls, text: str, path: pathlib.Path | str = "") -> pathlib.Path:
|
||||
"""path 是可选参数, 不填则自动返回生成文件路径"""
|
||||
return path # type: ignore
|
||||
return path # type: ignore
|
||||
|
||||
@@ -2,6 +2,7 @@ from .base import BaseTTS
|
||||
import pathlib
|
||||
import edge_tts
|
||||
|
||||
|
||||
class EdgeTTS(BaseTTS):
|
||||
name = "EdgeTTS"
|
||||
|
||||
@@ -12,4 +13,4 @@ class EdgeTTS(BaseTTS):
|
||||
"zh-CN-YunjianNeural",
|
||||
)
|
||||
communicate.save_sync(str(path))
|
||||
return path # type: ignore
|
||||
return path # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user