From 381468b7f429bdf30c4d805055f3b8365e176880 Mon Sep 17 00:00:00 2001 From: Callum Leslie Date: Mon, 6 Jun 2022 19:01:48 +0100 Subject: [PATCH] Fix typing --- tts/engine_wrapper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tts/engine_wrapper.py b/tts/engine_wrapper.py index 59df014..bd36f0c 100644 --- a/tts/engine_wrapper.py +++ b/tts/engine_wrapper.py @@ -1,4 +1,5 @@ from pathlib import Path +from typing import Callable from mutagen.mp3 import MP3 from utils.console import print_step, print_substep from rich.progress import track @@ -15,7 +16,7 @@ class TTSEngine: tts_function must take the arguments text and filepath. """ - def __init__(self, tts_function: function, reddit_object: dict, path: str = "assets/mp3", max_length: int = 50): + def __init__(self, tts_function: Callable[[str, str], None], reddit_object: dict, path: str = "assets/mp3", max_length: int = 50): self.tts_function = tts_function self.reddit_object = reddit_object self.path = path