https://github.com/voidful/t5lephone
phoneme byt5
https://github.com/voidful/t5lephone
Last synced: 10 months ago
JSON representation
phoneme byt5
- Host: GitHub
- URL: https://github.com/voidful/t5lephone
- Owner: voidful
- Created: 2022-03-12T14:30:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-11T11:26:21.000Z (over 3 years ago)
- Last Synced: 2025-08-28T20:58:28.111Z (10 months ago)
- Language: Python
- Size: 58.6 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# T5lephone-pretraining
## Installation
`pip install git+https://github.com/voidful/t5lephone.git`
## Release Model
| Model | link |
|------------------------|------------------------------------------------------|
| t5lephone_byt5 | https://huggingface.co/voidful/phoneme_byt5_v2 |
| t5lephone_mt5 | https://huggingface.co/voidful/phoneme-mt5 |
| t5lephone_longt5_local | https://huggingface.co/voidful/phoneme-longt5-local |
| t5lephone_longt5_local | https://huggingface.co/voidful/phoneme-longt5-global |
## Usage
### convert text to phoneme
```python
from telephone import Telephonemizer
telephonemizer = Telephonemizer()
telephonemizer.convert_text("hello")
```
### convert speech to phoneme
```python
from telephone import Telephonemizer
telephonemizer = Telephonemizer()
from datasets import load_dataset
ds = load_dataset("patrickvonplaten/librispeech_asr_dummy", "clean", split="validation")
telephonemizer.convert_voice(ds[0]["audio"]["array"])
```
## Pretrain model
### data progressing
```shell
python ./data_processing/data_preprocessing_t5.py --data ./example/example.txt --poisson_lam 20 --mask_prob 0.15 --output_name ./example/example_out_t5.csv
```
### model training
modify and run
`python pretrain.py`