Merge pull request #107 from Runware/feature-addAudioModelsXai/Dia
Added workflow for xAI TTS and Dia TTS
This commit is contained in:
@@ -53,7 +53,6 @@ from .modules.providerSettings.viduProviderSettings import RunwareViduProviderSe
|
||||
from .modules.mediaUpload import runwareMediaUpload
|
||||
from .modules.inputAudios import inputAudios
|
||||
from .modules.audioInput import RunwareAudioInput
|
||||
from .modules.audioInputCombine import RunwareAudioInputCombine
|
||||
from .modules.speechInput import RunwareSpeechInput
|
||||
from .modules.speechInputCombine import RunwareSpeechInputCombine
|
||||
from .modules.referenceVideos import referenceVideos
|
||||
@@ -163,7 +162,6 @@ NODE_CLASS_MAPPINGS = {
|
||||
"Runware Media Upload": runwareMediaUpload,
|
||||
"Runware Input Audios": inputAudios,
|
||||
"Runware Video Audio Input": RunwareAudioInput,
|
||||
"Runware Audio Inputs Combine": RunwareAudioInputCombine,
|
||||
"Runware Video Speech Input": RunwareSpeechInput,
|
||||
"Runware Speech Inputs Combine": RunwareSpeechInputCombine,
|
||||
"Runware Reference Videos": referenceVideos,
|
||||
|
||||
@@ -1212,6 +1212,8 @@ function videoSettingsToggleHandler(settingsNode) {
|
||||
function audioInferenceSpeechToggleHandler(speechNode) {
|
||||
if (!speechNode?.widgets) return;
|
||||
|
||||
const useVoiceWidget = speechNode.widgets.find(w => w && w.name === "useVoice");
|
||||
const voiceWidget = speechNode.widgets.find(w => w && w.name === "voice");
|
||||
const useSpeedWidget = speechNode.widgets.find(w => w && w.name === "useSpeed");
|
||||
const speedWidget = speechNode.widgets.find(w => w && w.name === "speed");
|
||||
const useVolumeWidget = speechNode.widgets.find(w => w && w.name === "useVolume");
|
||||
@@ -1244,6 +1246,7 @@ function audioInferenceSpeechToggleHandler(speechNode) {
|
||||
if (usePitchWidget && pitchWidget) toggleWidgetState(usePitchWidget, pitchWidget, "pitch");
|
||||
if (useEmotionWidget && emotionWidget) toggleWidgetState(useEmotionWidget, emotionWidget, "emotion");
|
||||
if (useToneWidget && toneWidget) toggleWidgetState(useToneWidget, toneWidget, "tone");
|
||||
if (useVoiceWidget && voiceWidget) toggleWidgetState(useVoiceWidget, voiceWidget, "voice");
|
||||
}
|
||||
|
||||
function acceleratorOptionsToggleHandler(acceleratorNode) {
|
||||
@@ -2763,6 +2766,12 @@ function audioModelSearchFilterHandler(audioModelSearchNode) {
|
||||
"Ace": [
|
||||
"runware:ace-step@0 (ACE Step v1 3.5B)",
|
||||
],
|
||||
"Dia": [
|
||||
"runware:dia@v1.0 (Dia 1.6B)",
|
||||
],
|
||||
"xAI": [
|
||||
"xai:voice@tts (xAI TTS)",
|
||||
],
|
||||
"MiniMax": [
|
||||
"minimax:speech@2.8 (MiniMax Speech 2.8)",
|
||||
],
|
||||
|
||||
@@ -26,12 +26,16 @@ class RunwareAudioInferenceSpeech:
|
||||
"default": "Hello, this is a test of the speech synthesis model.",
|
||||
"tooltip": "Text to synthesize as speech (speech.text)",
|
||||
}),
|
||||
"voice": ("STRING", {
|
||||
"default": "English_Whispering_girl",
|
||||
"tooltip": "Voice identifier - see System Voice ID List (speech.voice)",
|
||||
}),
|
||||
},
|
||||
"optional": {
|
||||
"useVoice": ("BOOLEAN", {
|
||||
"default": False,
|
||||
"tooltip": "Enable to include voice in speech synthesis (speech.voice).",
|
||||
}),
|
||||
"voice": ("STRING", {
|
||||
"default": "",
|
||||
"tooltip": "Voice identifier.",
|
||||
}),
|
||||
"useSpeed": ("BOOLEAN", {"default": True, "tooltip": "Include speed (speech.speed)"}),
|
||||
"speed": ("FLOAT", {
|
||||
"default": 1.0,
|
||||
@@ -78,6 +82,7 @@ class RunwareAudioInferenceSpeech:
|
||||
"""Build the speech object for the API (connect to Runware Audio Inference 'speech' input)."""
|
||||
text = (kwargs.get("text") or "").strip()
|
||||
voice = (kwargs.get("voice") or "").strip()
|
||||
use_voice = kwargs.get("useVoice", False)
|
||||
use_speed = kwargs.get("useSpeed", True)
|
||||
speed = float(kwargs.get("speed", 1.0))
|
||||
use_volume = kwargs.get("useVolume", True)
|
||||
@@ -89,7 +94,9 @@ class RunwareAudioInferenceSpeech:
|
||||
use_tone = kwargs.get("useTone", False)
|
||||
tone_str = kwargs.get("tone", "") or ""
|
||||
|
||||
speech: Dict[str, Any] = {"text": text, "voice": voice}
|
||||
speech: Dict[str, Any] = {"text": text}
|
||||
if use_voice:
|
||||
speech["voice"] = voice
|
||||
if use_speed:
|
||||
speech["speed"] = speed
|
||||
if use_volume:
|
||||
@@ -103,6 +110,8 @@ class RunwareAudioInferenceSpeech:
|
||||
if tone_lines:
|
||||
speech["tone"] = tone_lines
|
||||
|
||||
if not text:
|
||||
return ({},)
|
||||
return (speech,)
|
||||
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
"""
|
||||
Runware Audio Input Combine Node
|
||||
Combines multiple audio inputs into a list
|
||||
"""
|
||||
|
||||
from typing import List, Dict, Any
|
||||
|
||||
|
||||
class RunwareAudioInputCombine:
|
||||
"""Runware Audio Input Combine Node"""
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"Audio Input 1": ("RUNWAREAUDIOINPUT", {
|
||||
"tooltip": "Connect a Runware Audio Input node.",
|
||||
}),
|
||||
},
|
||||
"optional": {
|
||||
"Audio Input 2": ("RUNWAREAUDIOINPUT", {
|
||||
"tooltip": "Connect a Runware Audio Input node.",
|
||||
}),
|
||||
"Audio Input 3": ("RUNWAREAUDIOINPUT", {
|
||||
"tooltip": "Connect a Runware Audio Input node.",
|
||||
}),
|
||||
"Audio Input 4": ("RUNWAREAUDIOINPUT", {
|
||||
"tooltip": "Connect a Runware Audio Input node.",
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
DESCRIPTION = "Combine multiple audio inputs to connect with Runware Video Inference Inputs."
|
||||
FUNCTION = "audioInputCombine"
|
||||
RETURN_TYPES = ("RUNWAREAUDIOINPUT",)
|
||||
RETURN_NAMES = ("Audio Inputs",)
|
||||
CATEGORY = "Runware"
|
||||
|
||||
def audioInputCombine(self, **kwargs):
|
||||
"""Combine audio inputs into a list"""
|
||||
audioInputs = []
|
||||
|
||||
for i in range(1, 5):
|
||||
audioKey = f"Audio Input {i}"
|
||||
audioInput = kwargs.get(audioKey)
|
||||
if audioInput is not None and isinstance(audioInput, dict) and len(audioInput) > 0:
|
||||
audioInputs.append(audioInput)
|
||||
|
||||
return (audioInputs,)
|
||||
|
||||
|
||||
# Node class mappings
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"RunwareAudioInputCombine": RunwareAudioInputCombine,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"RunwareAudioInputCombine": "Runware Audio Inputs Combine",
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ class RunwareAudioModelSearch:
|
||||
"Ace": [
|
||||
"runware:ace-step@0 (ACE Step v1 3.5B)",
|
||||
],
|
||||
"Dia": [
|
||||
"runware:dia@v1.0 (Dia 1.6B)",
|
||||
],
|
||||
"xAI": [
|
||||
"xai:voice@tts (xAI TTS)",
|
||||
],
|
||||
"MiniMax": [
|
||||
"minimax:speech@2.8 (MiniMax Speech 2.8)",
|
||||
],
|
||||
@@ -32,6 +38,8 @@ class RunwareAudioModelSearch:
|
||||
"KlingAI",
|
||||
"Mirelo",
|
||||
"Ace",
|
||||
"Dia",
|
||||
"xAI",
|
||||
"MiniMax",
|
||||
"Inworld",
|
||||
]
|
||||
|
||||
@@ -24,7 +24,7 @@ class videoInferenceInputs:
|
||||
"tooltip": "Connect the mediaUUID output from Runware Media Upload node with audio file. This audio will be synchronized with the generated video. (Legacy: single audio string)"
|
||||
}),
|
||||
"Audio Inputs": ("RUNWAREAUDIOINPUT", {
|
||||
"tooltip": "Connect Runware Video Audio Input node or Runware Audio Inputs Combine node to provide audio inputs with reference IDs."
|
||||
"tooltip": "Connect Runware Video Audio Input node(s) to provide audio inputs with reference IDs."
|
||||
}),
|
||||
"Speech Inputs": ("RUNWARESPEECHINPUT", {
|
||||
"tooltip": "Connect Runware Video Speech Input node or Runware Speech Inputs Combine node to provide TTS speech inputs with reference IDs."
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user