freddyaboulton HF staff commited on
Commit
988d6c6
1 Parent(s): d6ec0fe
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +5 -2
  3. requirements.txt +2 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 📝
4
  colorFrom: red
5
  colorTo: indigo
6
  sdk: gradio
7
- sdk_version: 4.44.0
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
 
4
  colorFrom: red
5
  colorTo: indigo
6
  sdk: gradio
7
+ sdk_version: 5.0.1
8
  app_file: app.py
9
  pinned: false
10
  license: apache-2.0
app.py CHANGED
@@ -8,6 +8,9 @@ import numpy as np
8
  import spaces
9
  import gradio as gr
10
  import torch
 
 
 
11
 
12
  from parler_tts import ParlerTTSForConditionalGeneration
13
  from pydub import AudioSegment
@@ -17,8 +20,8 @@ from transformers.generation.streamers import BaseStreamer
17
  device = "cuda:0" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
18
  torch_dtype = torch.float16 if device != "cpu" else torch.float32
19
 
20
- repo_id = "ylacombe/parler-tiny-v1" # "parler-tts/parler_tts_mini_v0.1"
21
- jenny_repo_id = "ylacombe/parler-tts-mini-jenny-30H"
22
 
23
  model = ParlerTTSForConditionalGeneration.from_pretrained(
24
  repo_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
 
8
  import spaces
9
  import gradio as gr
10
  import torch
11
+ from gradio_webrtc import WebRTC
12
+ from gradio_webrtc import WebRTC
13
+ from twilio.rest import Client
14
 
15
  from parler_tts import ParlerTTSForConditionalGeneration
16
  from pydub import AudioSegment
 
20
  device = "cuda:0" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
21
  torch_dtype = torch.float16 if device != "cpu" else torch.float32
22
 
23
+ repo_id = "parler-tts/parler_tts_mini_v0.1"
24
+ jenny_repo_id = "parler-tts/parler-tts-mini-jenny-30H"
25
 
26
  model = ParlerTTSForConditionalGeneration.from_pretrained(
27
  repo_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  git+https://github.com/huggingface/parler-tts.git
2
  accelerate
3
- https://gradio-pypi-previews.s3.amazonaws.com/73647a07b0439efabe3dd218ff6c366ffa3b84a0/gradio-4.44.0-py3-none-any.whl
 
 
1
  git+https://github.com/huggingface/parler-tts.git
2
  accelerate
3
+ https://gradio-builds.s3.amazonaws.com/webrtc/04/gradio_webrtc-0.0.1-py3-none-any.whl
4
+ twilio