Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- pyproject.toml +1 -1
- src/vocalizr/model.py +4 -2
pyproject.toml
CHANGED
@@ -35,7 +35,7 @@ dev = [
|
|
35 |
Chatacter = "Chatacter"
|
36 |
|
37 |
[tool.pylint]
|
38 |
-
disable = ["E1101", "C0114"]
|
39 |
|
40 |
[tool.ruff]
|
41 |
show-fixes = true
|
|
|
35 |
Chatacter = "Chatacter"
|
36 |
|
37 |
[tool.pylint]
|
38 |
+
disable = ["E1101", "C0114", "R0913", "R0917"]
|
39 |
|
40 |
[tool.ruff]
|
41 |
show-fixes = true
|
src/vocalizr/model.py
CHANGED
@@ -84,9 +84,11 @@ def generate_audio_for_text(
|
|
84 |
if audio is None or isinstance(audio, str):
|
85 |
logger.exception(f"Unexpected type (audio): {type(audio)}")
|
86 |
raise Error(message=f"Unexpected type (audio): {type(audio)}")
|
87 |
-
|
|
|
88 |
audio_np: NDArray[float32] = audio.numpy()
|
89 |
if save_file:
|
90 |
-
|
|
|
91 |
save_file_wav(audio=audio_np)
|
92 |
yield 24000, audio_np
|
|
|
84 |
if audio is None or isinstance(audio, str):
|
85 |
logger.exception(f"Unexpected type (audio): {type(audio)}")
|
86 |
raise Error(message=f"Unexpected type (audio): {type(audio)}")
|
87 |
+
if debug:
|
88 |
+
logger.info(f"Generating audio for '{text}'")
|
89 |
audio_np: NDArray[float32] = audio.numpy()
|
90 |
if save_file:
|
91 |
+
if debug:
|
92 |
+
logger.info(f"Saving audio file at {AUDIO_FILE_PATH}")
|
93 |
save_file_wav(audio=audio_np)
|
94 |
yield 24000, audio_np
|