Spaces:
Running
on
Zero
Running
on
Zero
File size: 1,225 Bytes
720885e 45aaff7 a7553e9 5c2ac5e 2493b46 8c97255 a7553e9 11240c1 a7553e9 249b0a6 2493b46 a7553e9 8c97255 de65c2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
import gradio as gr
import torch
from transformers import AutoProcessor, CsmForConditionalGeneration
import librosa
import numpy as np
import soundfile as sf
import tempfile
import os
import re
import spaces
from csm1b_dv import (
get_csm1b_tab, load_model, get_current_speaker_prompts,
get_model_info, get_speaker_choices, load_audio_file,
generate_simple_audio, generate_context_audio, trim_silence,
split_sentences, extract_audio_output, generate_conversation,
change_model_and_update_ui
)
from dia_1_6B_dv import get_dia_1_6B_tab
with gr.Blocks(
title="Dhivehi (Thaana) Text-to-Speech",
css="""
.dhivehi-text textarea {
font-size: 18px !important;
font-family: 'MV_Faseyha', 'Faruma', 'A_Faruma', monospace !important;
line-height: 1.8 !important;
direction: rtl !important;
text-align: right !important;
}
.dhivehi-text input {
font-size: 18px !important;
font-family: 'MV_Faseyha', 'Faruma', 'A_Faruma', monospace !important;
direction: rtl !important;
text-align: right !important;
}
"""
) as app:
get_csm1b_tab()
get_dia_1_6B_tab()
if __name__ == "__main__":
app.launch(share=False) |