From dc76f4b7cfff27712c8ee8cc17998734134b0feb Mon Sep 17 00:00:00 2001 From: Sirshendu Ganguly Date: Tue, 21 Apr 2026 10:04:11 +0530 Subject: [PATCH] Fixed types and imports --- modules/audioInferenceSpeech.py | 4 ++-- modules/audioInferenceSpeechVoices.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/audioInferenceSpeech.py b/modules/audioInferenceSpeech.py index 09f6362..87dda60 100644 --- a/modules/audioInferenceSpeech.py +++ b/modules/audioInferenceSpeech.py @@ -97,9 +97,9 @@ class RunwareAudioInferenceSpeech: text = (kwargs.get("text") or "").strip() voice = (kwargs.get("voice") or "").strip() use_voice = kwargs.get("useVoice", False) - use_speed = kwargs.get("useSpeed", True) + use_speed = kwargs.get("useSpeed", False) speed = float(kwargs.get("speed", 1.0)) - use_volume = kwargs.get("useVolume", True) + use_volume = kwargs.get("useVolume", False) volume = float(kwargs.get("volume", 1.0)) use_pitch = kwargs.get("usePitch", False) pitch = float(kwargs.get("pitch", 0.0)) diff --git a/modules/audioInferenceSpeechVoices.py b/modules/audioInferenceSpeechVoices.py index 91f1714..794749a 100644 --- a/modules/audioInferenceSpeechVoices.py +++ b/modules/audioInferenceSpeechVoices.py @@ -4,7 +4,7 @@ Builds speech.voices[] for multi-speaker audio inference speech payloads. """ import re -from typing import Any, Dict, List +from typing import Dict, List class RunwareAudioInferenceSpeechVoices: @@ -18,7 +18,7 @@ class RunwareAudioInferenceSpeechVoices: optional_inputs = {} for i in range(1, cls.MAX_VOICES + 1): optional_inputs[f"useVoice{i}"] = ("BOOLEAN", { - "default": i == 1, + "default": False, "tooltip": f"Enable to include speaker/voice pair #{i} in speech.voices.", }) optional_inputs[f"speaker{i}"] = ("STRING", { @@ -44,12 +44,12 @@ class RunwareAudioInferenceSpeechVoices: "Each item contains speaker (unique alphanumeric alias) and voice name." ) - def createVoices(self, **kwargs) -> tuple[List[Dict[str, str]]]: - voices: List[Dict[str, str]] = [] + def createVoices(self, **kwargs) -> tuple[list[dict[str, str]],]: + voices: list[dict[str, str]] = [] seen_speakers = set() for i in range(1, self.MAX_VOICES + 1): - use_voice = bool(kwargs.get(f"useVoice{i}", i == 1)) + use_voice = bool(kwargs.get(f"useVoice{i}", False)) if not use_voice: continue