Skip to content

SOTA Open Source TTS

[pre-commit.ci] pre-commit autoupdate (#159)

pre-commit-ci[bot]40d8200c2d94
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 71861cf..94969e0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,7 +9,7 @@ repos:
args: [--profile=black]
- repo: https://github.com/psf/black
- rev: 23.12.1
+ rev: 24.4.2
hooks:
- id: black
@@ -21,7 +21,7 @@ repos:
args: [-L=fro]
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.5.0
+ rev: v4.6.0
hooks:
- id: end-of-file-fixer
- id: check-yaml
diff --git a/fish_speech/utils/rich_utils.py b/fish_speech/utils/rich_utils.py
index c8f77c7..6a465f5 100644
--- a/fish_speech/utils/rich_utils.py
+++ b/fish_speech/utils/rich_utils.py
@@ -43,9 +43,13 @@ def print_config_tree(
# add fields from `print_order` to queue
for field in print_order:
- queue.append(field) if field in cfg else log.warning(
- f"Field '{field}' not found in config. "
- + f"Skipping '{field}' config printing..."
+ (
+ queue.append(field)
+ if field in cfg
+ else log.warning(
+ f"Field '{field}' not found in config. "
+ + f"Skipping '{field}' config printing..."
+ )
)
# add all the other fields to queue (not specified in `print_order`)
diff --git a/fish_speech/webui/launch_utils.py b/fish_speech/webui/launch_utils.py
index a15091c..2f57b59 100644
--- a/fish_speech/webui/launch_utils.py
+++ b/fish_speech/webui/launch_utils.py
@@ -83,16 +83,12 @@ class Seafoam(Base):
spacing_size: sizes.Size | str = sizes.spacing_md,
radius_size: sizes.Size | str = sizes.radius_md,
text_size: sizes.Size | str = sizes.text_lg,
- font: fonts.Font
- | str
- | Iterable[fonts.Font | str] = (
+ font: fonts.Font | str | Iterable[fonts.Font | str] = (
fonts.GoogleFont("Quicksand"),
"ui-sans-serif",
"sans-serif",
),
- font_mono: fonts.Font
- | str
- | Iterable[fonts.Font | str] = (
+ font_mono: fonts.Font | str | Iterable[fonts.Font | str] = (
fonts.GoogleFont("IBM Plex Mono"),
"ui-monospace",
"monospace",
diff --git a/fish_speech/webui/manage.py b/fish_speech/webui/manage.py
index 9c91a59..e86a3b8 100644
--- a/fish_speech/webui/manage.py
+++ b/fish_speech/webui/manage.py
@@ -452,9 +452,7 @@ def train_process(
project = (
("vqgan_" + new_project)
if vqgan_ckpt == "new"
- else latest
- if vqgan_ckpt == "latest"
- else vqgan_ckpt
+ else latest if vqgan_ckpt == "latest" else vqgan_ckpt
)
logger.info(project)
train_cmd = [
@@ -524,9 +522,7 @@ def train_process(
project = (
("text2semantic_" + new_project)
if llama_ckpt == "new"
- else latest
- if llama_ckpt == "latest"
- else llama_ckpt
+ else latest if llama_ckpt == "latest" else llama_ckpt
)
logger.info(project)
train_cmd = [
@@ -861,9 +857,11 @@ with gr.Blocks(
minimum=0,
maximum=16,
step=1,
- value=init_llama_yml["data"]["num_workers"]
- if sys.platform == "linux"
- else 0,
+ value=(
+ init_llama_yml["data"]["num_workers"]
+ if sys.platform == "linux"
+ else 0
+ ),
)
with gr.Row(equal_height=False):
llama_data_batch_size_slider = gr.Slider(
diff --git a/tools/whisper_asr.py b/tools/whisper_asr.py
index d303607..5495953 100644
--- a/tools/whisper_asr.py
+++ b/tools/whisper_asr.py
@@ -21,6 +21,7 @@ to transcribe the second speaker.
Note: Be aware of your audio sample rate, which defaults to 44.1kHz.
"""
+
from pathlib import Path
import click