改进
This commit is contained in:
@@ -21,7 +21,7 @@ from reactor import Reactor, Apparatus
|
||||
import auxiliary as aux
|
||||
import compositions as compo
|
||||
import builtins
|
||||
import main
|
||||
import metadata
|
||||
|
||||
config = aux.ConfigFile("config.toml")
|
||||
|
||||
@@ -108,7 +108,6 @@ class MemScreen(Screen):
|
||||
print(type(self.compo).__name__)
|
||||
|
||||
def action_play_voice(self):
|
||||
print("VOICE")
|
||||
def play():
|
||||
cache_dir = pathlib.Path(f"./cache/voice/")
|
||||
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -116,7 +115,7 @@ class MemScreen(Screen):
|
||||
if not cache.exists():
|
||||
communicate = tts.Communicate(
|
||||
self.reactor.current_atom[1].content.replace("/", ""),
|
||||
"zh-CN-YunjianNeural",
|
||||
"zh-CN-XiaoxiaoNeural",
|
||||
)
|
||||
communicate.save_sync(
|
||||
f"./cache/voice/{self.reactor.current_atom[1].content.replace('/','')}.wav"
|
||||
@@ -191,7 +190,7 @@ class FileSelectorScreen(Screen):
|
||||
def compose(self) -> ComposeResult:
|
||||
yield Header(show_clock=True)
|
||||
yield Container(
|
||||
Label(f'欢迎使用 "潜进" 辅助记忆软件, 版本 {main.ver}', classes="title-label"),
|
||||
Label(f'欢迎使用 "潜进" 辅助记忆软件, 版本 {metadata.ver}', classes="title-label"),
|
||||
Label("选择要学习的文件:", classes="title-label"),
|
||||
ListView(id="file-list", classes="file-list-view"),
|
||||
)
|
||||
|
Reference in New Issue
Block a user