Views
No views yet
pip install git+https://github.com/nipponjo/tts_arabic.git1# %%
2from tts_arabic import tts
3
4# %%
5text = "السَّلامُ عَلَيكُم يَا صَدِيقِي."
6wave = tts(text, speaker=2, pace=0.9, play=True)
7
8# %% Buckwalter transliteration
9text = ">ls~alAmu Ealaykum yA Sadiyqiy."
10wave = tts(text, speaker=0, play=True)
11
12# %% Unvocalized input
13text_unvoc = "القهوة مشروب يعد من بذور البن المحمصة"
14wave = tts(text_unvoc, play=True, vowelizer='catt_eo')
15| Model | Model ID | Type | #params | Paper | Output |
|---|---|---|---|---|---|
| FastPitch | fastpitch | Text->Mel | 46.3M | arxiv | Mel (80 bins) |
| MixerTTS | mixer128 | Text->Mel | 2.9M | arxiv | Mel (80 bins) |
| MixerTTS | mixer80 | Text->Mel | 1.5M | arxiv | Mel (80 bins) |
| HiFi-GAN | hifigan | Vocoder | 13.9M | arxiv | Wave (22.05kHz) |
| Vocos | vocos | Vocoder | 13.4M | arxiv | Wave (22.05kHz) |
| Vocos | vocos44 | Vocoder | 14.0M | arxiv | Wave (44.1kHz) |
Text->Mel models map token ids to mel frames. All models use the 80 bin configuration proposed by HiFi-GAN. This mel spectrogram contains frequencies up to 8kHz. The vocoder models map the mel spectrogram to a waveform. The vocoders with vocoder_id hifigan and vocos artificially extend the bandwidth to 11025Hz, and vocos44 to 22050Hz. Samples for comparing the models can be found here.1from tts_arabic import tts
2
3text = "السَّلامُ عَلَيكُم يَا صَدِيقِي."
4wave = tts(
5 text, # input text
6 speaker = 1, # speaker id; choose between 0,1,2,3
7 pace = 1, # speaker pace
8 denoise = 0.005, # vocoder denoiser strength
9 volume = 0.9, # Max amplitude (between 0 and 1)
10 play = True, # play audio?
11 pitch_mul = 1, # pitch multiplier
12 pitch_add = 0, # pitch offset
13 vowelizer = None, # vowelizer model
14 model_id = 'fastpitch', # Model ID for Text->Mel model
15 vocoder_id = 'hifigan', # Model ID for vocoder model
16 cuda = None, # Optional; CUDA device index
17 save_to = './test.wav', # Optionally; save audio WAV file
18 bits_per_sample = 32, # when save_to is specified (8, 16 or 32 bits)
19 )
20| Model | Model ID | Paper | Repo | Architecture |
|---|---|---|---|---|
| CATT | catt_eo | arxiv | github | Transformer Encoder |
| Shakkelha | shakkelha | arxiv | github | Bi-LSTM |
| Shakkala | shakkala | - | github | Bi-LSTM |
vocos44 was converted from (patriotyk/vocos-mel-hifigan-compat-44100khz).catt_eo was converted from https://github.com/abjadai/catt/releases/tag/v2 best_eo_mlm_ns_epoch_193.pt (License: Apache-2.0)