core[patch]: Add kwargs to Runnable (#27008)

Fixes #26685

---------

Co-authored-by: Tibor Reiss <tibor.reiss@gmail.com>
This commit is contained in:
Eugene Yurtsev
2024-09-30 16:45:29 -04:00
committed by GitHub
parent 2a6abd3f0a
commit 7fde2791dc
12 changed files with 49 additions and 19 deletions

View File

@@ -471,7 +471,8 @@ class RivaASR(
def invoke(
self,
input: ASRInputType,
_: Optional[RunnableConfig] = None,
config: Optional[RunnableConfig] = None,
**kwargs: Any,
) -> ASROutputType:
"""Transcribe the audio bytes into a string with Riva."""
# create an output text generator with Riva
@@ -567,7 +568,10 @@ class RivaTTS(
) from err
def invoke(
self, input: TTSInputType, _: Union[RunnableConfig, None] = None
self,
input: TTSInputType,
config: Optional[RunnableConfig] = None,
**kwargs: Any,
) -> TTSOutputType:
"""Perform TTS by taking a string and outputting the entire audio file."""
return b"".join(self.transform(iter([input])))