Spaces:
Runtime error
Runtime error
Commit
·
371e3a0
1
Parent(s):
0b2ae50
update for hf
Browse files
README.md
CHANGED
|
@@ -10,6 +10,8 @@ sdk_version: 5.9.0
|
|
| 10 |
python_version: 3.10
|
| 11 |
preload_from_hub:
|
| 12 |
- FunAudioLLM/CosyVoice2-0.5B
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
[](https://github.com/Akshay090/svg-banners)
|
|
|
|
| 10 |
python_version: 3.10
|
| 11 |
preload_from_hub:
|
| 12 |
- FunAudioLLM/CosyVoice2-0.5B
|
| 13 |
+
- FunAudioLLM/SenseVoiceSmall
|
| 14 |
+
- FunAudioLLM/CosyVoice-ttsfrd
|
| 15 |
---
|
| 16 |
|
| 17 |
[](https://github.com/Akshay090/svg-banners)
|
app.py
CHANGED
|
@@ -45,6 +45,7 @@ import numpy as np
|
|
| 45 |
import torchaudio
|
| 46 |
import random
|
| 47 |
import librosa
|
|
|
|
| 48 |
from funasr import AutoModel
|
| 49 |
from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
| 50 |
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
@@ -97,6 +98,7 @@ def prompt_wav_recognition(prompt_wav):
|
|
| 97 |
text = res[0]["text"].split('|>')[-1]
|
| 98 |
return text
|
| 99 |
|
|
|
|
| 100 |
def generate_audio(tts_text, mode_checkbox_group, prompt_text, prompt_wav_upload, prompt_wav_record, instruct_text,
|
| 101 |
seed, stream):
|
| 102 |
sft_dropdown, speed = '', 1.0
|
|
|
|
| 45 |
import torchaudio
|
| 46 |
import random
|
| 47 |
import librosa
|
| 48 |
+
import spaces
|
| 49 |
from funasr import AutoModel
|
| 50 |
from funasr.utils.postprocess_utils import rich_transcription_postprocess
|
| 51 |
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
| 98 |
text = res[0]["text"].split('|>')[-1]
|
| 99 |
return text
|
| 100 |
|
| 101 |
+
@spaces.GPU
|
| 102 |
def generate_audio(tts_text, mode_checkbox_group, prompt_text, prompt_wav_upload, prompt_wav_record, instruct_text,
|
| 103 |
seed, stream):
|
| 104 |
sft_dropdown, speed = '', 1.0
|