SWivid commited on
Commit
1d5e6ba
·
1 Parent(s): a931cba

formatting, update readme

Browse files
README.md CHANGED
@@ -120,9 +120,6 @@ f5-tts_infer-gradio --port 7860 --host 0.0.0.0
120
 
121
  # Launch a share link
122
  f5-tts_infer-gradio --share
123
-
124
- # Automatically open in default web browser
125
- f5-tts_infer-gradio --autolaunch
126
  ```
127
 
128
  <details>
 
120
 
121
  # Launch a share link
122
  f5-tts_infer-gradio --share
 
 
 
123
  ```
124
 
125
  <details>
src/f5_tts/infer/README.md CHANGED
@@ -23,12 +23,24 @@ Currently supported features:
23
  - Basic TTS with Chunk Inference
24
  - Multi-Style / Multi-Speaker Generation
25
  - Voice Chat powered by Qwen2.5-3B-Instruct
 
26
 
27
  The cli command `f5-tts_infer-gradio` equals to `python src/f5_tts/infer/infer_gradio.py`, which launches a Gradio APP (web interface) for inference.
28
 
29
  The script will load model checkpoints from Huggingface. You can also manually download files and update the path to `load_model()` in `infer_gradio.py`. Currently only load TTS models first, will load ASR model to do transcription if `ref_text` not provided, will load LLM model if use Voice Chat.
30
 
31
- Could also be used as a component for larger application.
 
 
 
 
 
 
 
 
 
 
 
32
  ```python
33
  import gradio as gr
34
  from f5_tts.infer.infer_gradio import app
 
23
  - Basic TTS with Chunk Inference
24
  - Multi-Style / Multi-Speaker Generation
25
  - Voice Chat powered by Qwen2.5-3B-Instruct
26
+ - [Custom inference with more language support](src/f5_tts/infer/SHARED.md)
27
 
28
  The cli command `f5-tts_infer-gradio` equals to `python src/f5_tts/infer/infer_gradio.py`, which launches a Gradio APP (web interface) for inference.
29
 
30
  The script will load model checkpoints from Huggingface. You can also manually download files and update the path to `load_model()` in `infer_gradio.py`. Currently only load TTS models first, will load ASR model to do transcription if `ref_text` not provided, will load LLM model if use Voice Chat.
31
 
32
+ More flags options:
33
+
34
+ ```bash
35
+ # Automatically launch the interface in the default web browser
36
+ f5-tts_infer-gradio --inbrowser
37
+
38
+ # Set the root path of the application, if it's not served from the root ("/") of the domain
39
+ # For example, if the application is served at "https://example.com/myapp"
40
+ f5-tts_infer-gradio --root_path "/myapp"
41
+ ```
42
+
43
+ Could also be used as a component for larger application:
44
  ```python
45
  import gradio as gr
46
  from f5_tts.infer.infer_gradio import app
src/f5_tts/infer/infer_gradio.py CHANGED
@@ -876,17 +876,22 @@ If you're having issues, try converting your reference audio to WAV or MP3, clip
876
  help='The root path (or "mount point") of the application, if it\'s not served from the root ("/") of the domain. Often used when the application is behind a reverse proxy that forwards requests to the application, e.g. set "/myapp" or full URL for application served at "https://example.com/myapp".',
877
  )
878
  @click.option(
879
- "--autolaunch",
880
- "-l",
881
  is_flag=True,
882
  default=False,
883
  help="Automatically launch the interface in the default web browser",
884
  )
885
- def main(port, host, share, api, root_path, autolaunch):
886
  global app
887
  print("Starting app...")
888
  app.queue(api_open=api).launch(
889
- server_name=host, server_port=port, share=share, show_api=api, root_path=root_path, inbrowser=autolaunch
 
 
 
 
 
890
  )
891
 
892
 
 
876
  help='The root path (or "mount point") of the application, if it\'s not served from the root ("/") of the domain. Often used when the application is behind a reverse proxy that forwards requests to the application, e.g. set "/myapp" or full URL for application served at "https://example.com/myapp".',
877
  )
878
  @click.option(
879
+ "--inbrowser",
880
+ "-i",
881
  is_flag=True,
882
  default=False,
883
  help="Automatically launch the interface in the default web browser",
884
  )
885
+ def main(port, host, share, api, root_path, inbrowser):
886
  global app
887
  print("Starting app...")
888
  app.queue(api_open=api).launch(
889
+ server_name=host,
890
+ server_port=port,
891
+ share=share,
892
+ show_api=api,
893
+ root_path=root_path,
894
+ inbrowser=inbrowser,
895
  )
896
 
897