antoniomae1234 commited on
Commit
5a2386f
β€’
1 Parent(s): e82e8a8

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +12 -0
  2. app.py +26 -0
  3. gitattributes +35 -0
  4. requirements.txt +2 -0
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Voice Clone
3
+ emoji: πŸ“Š
4
+ colorFrom: yellow
5
+ colorTo: pink
6
+ sdk: gradio
7
+ sdk_version: 4.21.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from TTS.api import TTS
3
+ import gradio as gr
4
+ device="cuda" if torch.cuda.is_available() else "cpu"
5
+
6
+ tts=TTS(model_name="voice_conversion_models/multilingual/vctk/freevc24",progress_bar=False).to(device)
7
+ path="output.wav"
8
+ target_voice=""
9
+ source_voice=""
10
+ def VoiceClone(source_Uvoice,source_Mvoice,Target_UVoice,Target_MVoive):
11
+ if source_Uvoice is not None:
12
+ source_voice=source_Uvoice
13
+ elif source_Mvoice is not None:
14
+ source_voice=source_Mvoice
15
+ if Target_UVoice is not None:
16
+ target_voice=Target_UVoice
17
+ elif Target_MVoive is not None:
18
+ target_voice=Target_MVoive
19
+ return tts.voice_conversion_to_file(source_wav=source_voice, target_wav=target_voice, file_path=path)
20
+
21
+
22
+ interface=gr.Interface(fn=VoiceClone,inputs=[gr.Audio(type="filepath", sources="upload",label='Please upload a source voice'),gr.Audio(sources="microphone", type="filepath", streaming=True),gr.Audio(type="filepath", sources="upload",label='Please upload Target Voice'),gr.Audio(sources="microphone", type="filepath", streaming=True)],
23
+ outputs=[gr.Audio(type="filepath")],
24
+ title="Abdul Rehman Voice Cloning and Conversion Tool",
25
+ description="Change your voice into Target voice tone")
26
+ interface.launch(debug=True)
gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ TTS
2
+ torch