mrfakename commited on
Commit
9c9acb6
1 Parent(s): 5c7970d

Sync from GitHub repo

Browse files

This Space is synced from the GitHub repo: https://github.com/SWivid/F5-TTS. Please submit contributions to the Space there

Files changed (2) hide show
  1. Dockerfile +25 -0
  2. app.py +19 -1
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.4.0-cuda12.4-cudnn9-devel
2
+
3
+ USER root
4
+
5
+ ARG DEBIAN_FRONTEND=noninteractive
6
+
7
+ LABEL github_repo="https://github.com/SWivid/F5-TTS"
8
+
9
+ RUN set -x \
10
+ && apt-get update \
11
+ && apt-get -y install wget curl man git less openssl libssl-dev unzip unar build-essential aria2 tmux vim \
12
+ && apt-get install -y openssh-server sox libsox-fmt-all libsox-fmt-mp3 libsndfile1-dev ffmpeg \
13
+ && rm -rf /var/lib/apt/lists/* \
14
+ && apt-get clean
15
+
16
+ WORKDIR /workspace
17
+
18
+ RUN git clone https://github.com/SWivid/F5-TTS.git \
19
+ && cd F5-TTS \
20
+ && pip install --no-cache-dir -r requirements.txt \
21
+ && pip install --no-cache-dir -r requirements_eval.txt
22
+
23
+ ENV SHELL=/bin/bash
24
+
25
+ WORKDIR /workspace/F5-TTS
app.py CHANGED
@@ -768,6 +768,24 @@ If you're having issues, try converting your reference audio to WAV or MP3, clip
768
  )
769
  gr.TabbedInterface([app_tts, app_podcast, app_emotional, app_credits], ["TTS", "Podcast", "Multi-Style", "Credits"])
770
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
771
 
772
 
773
- app.queue().launch()
 
 
768
  )
769
  gr.TabbedInterface([app_tts, app_podcast, app_emotional, app_credits], ["TTS", "Podcast", "Multi-Style", "Credits"])
770
 
771
+ @click.command()
772
+ @click.option("--port", "-p", default=None, type=int, help="Port to run the app on")
773
+ @click.option("--host", "-H", default=None, help="Host to run the app on")
774
+ @click.option(
775
+ "--share",
776
+ "-s",
777
+ default=False,
778
+ is_flag=True,
779
+ help="Share the app via Gradio share link",
780
+ )
781
+ @click.option("--api", "-a", default=True, is_flag=True, help="Allow API access")
782
+ def main(port, host, share, api):
783
+ global app
784
+ print(f"Starting app...")
785
+ app.queue(api_open=api).launch(
786
+ server_name=host, server_port=port, share=share, show_api=api
787
+ )
788
 
789
 
790
+ if __name__ == "__main__":
791
+ main()