Fix compatibility issue

This commit is contained in:
babysor00 2022-06-18 23:46:44 +08:00
parent 6a793cea84
commit ee643d7cbc
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import numpy as np
from mkgui.base.components.types import FileContent from mkgui.base.components.types import FileContent
from vocoder.hifigan import inference as gan_vocoder from vocoder.hifigan import inference as gan_vocoder
from synthesizer.inference import Synthesizer from synthesizer.inference import Synthesizer
from typing import Any from typing import Any, Tuple
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
# Constants # Constants
@ -73,7 +73,7 @@ class AudioEntity(BaseModel):
mel: Any mel: Any
class Output(BaseModel): class Output(BaseModel):
__root__: tuple[AudioEntity, AudioEntity] __root__: Tuple[AudioEntity, AudioEntity]
def render_output_ui(self, streamlit_app, input) -> None: # type: ignore def render_output_ui(self, streamlit_app, input) -> None: # type: ignore
"""Custom output UI. """Custom output UI.

View File

@ -71,7 +71,7 @@ class Input(BaseModel):
description="选择语音转换模型文件." description="选择语音转换模型文件."
) )
vocoder: vocoders = Field( vocoder: vocoders = Field(
..., alias="语音码模型", ..., alias="语音码模型",
description="选择语音解码模型文件(目前只支持HifiGan类型)." description="选择语音解码模型文件(目前只支持HifiGan类型)."
) )