Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@


WEB_DIRECTORY = "./web"
from .nodes import LoadAudio,PreViewAudio,LoadSRT,FishSpeech_INFER,FishSpeech_INFER_SRT
from .nodes import LoadAudioPath,PreViewAudio,LoadSRT,FishSpeech_INFER,FishSpeech_INFER_SRT

NODE_CLASS_MAPPINGS = {
"LoadAudio": LoadAudio,
"LoadAudioPath": LoadAudioPath,
"PreViewAudio": PreViewAudio,
"LoadSRT": LoadSRT,
"FishSpeech_INFER": FishSpeech_INFER,
Expand All @@ -36,7 +36,7 @@

# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"LoadAudio": "AudioLoader",
"LoadAudioPath": "LoadAudioPath",
"PreViewAudio": "PreView Audio",
"LoadSRT": "SRT FILE Loader",
"FishSpeech_INFER": "FishSpeech Inference",
Expand Down
14 changes: 7 additions & 7 deletions nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FishSpeech_INFER_SRT:
def INPUT_TYPES(s):
return {"required":{
"text":("SRT",),
"prompt_audio": ("AUDIO",),
"prompt_audio": ("AUDIOPATH",),
"prompt_text":("SRT",),
"if_mutiple_speaker":("BOOLEAN",{
"default": False
Expand Down Expand Up @@ -71,7 +71,7 @@ def INPUT_TYPES(s):
}}

CATEGORY = "AIFSH_FishSpeech"
RETURN_TYPES = ('AUDIO',)
RETURN_TYPES = ('AUDIOPATH',)
OUTPUT_NODE = False

FUNCTION = "get_tts_wav"
Expand Down Expand Up @@ -216,7 +216,7 @@ class FishSpeech_INFER:
@classmethod
def INPUT_TYPES(s):
return {"required":{
"prompt_audio": ("AUDIO",),
"prompt_audio": ("AUDIOPATH",),
"text":("STRING",{
"multiline": True,
"default": "你好啊,世界!"
Expand Down Expand Up @@ -268,7 +268,7 @@ def INPUT_TYPES(s):
}}

CATEGORY = "AIFSH_FishSpeech"
RETURN_TYPES = ('AUDIO',)
RETURN_TYPES = ('AUDIOPATH',)
OUTPUT_NODE = False

FUNCTION = "get_tts_wav"
Expand Down Expand Up @@ -329,7 +329,7 @@ class PreViewAudio:
@classmethod
def INPUT_TYPES(s):
return {"required":
{"audio": ("AUDIO",),}
{"audio": ("AUDIOPATH",),}
}

CATEGORY = "AIFSH_FishSpeech"
Expand All @@ -347,7 +347,7 @@ def load_audio(self, audio):
audio_root = os.path.basename(tmp_path)
return {"ui": {"audio":[audio_name,audio_root]}}

class LoadAudio:
class LoadAudioPath:
@classmethod
def INPUT_TYPES(s):
files = [f for f in os.listdir(input_path) if os.path.isfile(os.path.join(input_path, f)) and f.split('.')[-1] in ["wav", "mp3","WAV","flac","m4a"]]
Expand All @@ -357,7 +357,7 @@ def INPUT_TYPES(s):

CATEGORY = "AIFSH_FishSpeech"

RETURN_TYPES = ("AUDIO",)
RETURN_TYPES = ("AUDIOPATH",)
FUNCTION = "load_audio"

def load_audio(self, audio):
Expand Down