Commit Graph

89 Commits

Author SHA1 Message Date
litagin02
837c4397db Merge pull request #118 from tsukumijima/dev
音声合成時に読み上げテキストの読みを表す音素列を指定する機能を追加 + 様々な改善
2024-05-15 07:37:46 +09:00
tsukumi
44693e7d6b Refactor: improve regular expression performance during NLP
Improve performance by pre-compiling regular expressions that are executed many times.
2024-05-12 17:53:30 +09:00
gordon0414
7de367b76f moved tokenizer loading inside of g2p function for code integrity. 2024-05-10 11:55:38 +09:00
gordon0414
3018309199 Optimize g2p function for improved speed and efficiency
- Moved global variables (ARPA, _g2p, eng_dict, tokenizer) to top-level scope to avoid redundant initialization.
- Simplified conditions for words with apostrophes.
- Streamlined __post_replace_ph function by removing redundant checks.
- Optimized __refine_syllables function with direct iteration.
- Avoided re-initialization of tokenizer in __text_to_words by moving it to global scope.
- Added performance test in __main__ to validate improvements.
- Resolves issue #104.
2024-05-09 16:12:15 +09:00
tsukumi
2d6baa3928 Fix: changed the substitute phoneme from「ん」to 「'」 when the pronunciation can't be obtained 2024-05-06 22:17:34 +09:00
tsukumi
87144dd321 Improve: automatically generate configs/paths.yml by copying it from configs/default_paths.yml when running initialize.py
If configs/paths.yml itself is included in version control, differences will occur when it is changed in each environment, which is troublesome.
2024-05-06 20:56:07 +09:00
tsukumi
b230832528 Add: allow hyper-parameters and style vectors to be specified directly 2024-05-06 20:43:22 +09:00
tsukumi
aa0f9308b1 Refactor: remove dependencies on libraries not required for style_bert_vits2 as a library
librosa: Originally not used under style_bert_vits2/.
pyannote.audio: Required only when using the "infer style vector from audio" function during inference, but it is currently almost unused.
scipy: Because it was used in only one utility function that was not needed outside of training.
2024-04-25 00:31:14 +00:00
tsukumi
28f254f449 Improve: remove Gradio dependency from style_bert_vits2 as a library 2024-04-23 05:45:11 +00:00
tsukumi
9d15d5763d Refactor: run "hatch run style:fmt" 2024-04-19 04:17:27 +00:00
tsukumi
797c354b1b Add: the ability to specify a phoneme sequence representing the reading of the text to be read during speech synthesis
With this feature, it is possible to specify individual readings for homonyms such as "明日 (ashita/asu)" while maintaining the Kanji representation of the read text.
2024-04-19 04:09:21 +00:00
litagin02
76be727b2e Bump ver 2024-03-16 18:22:35 +09:00
litagin02
1a8a7edb9c Docs and bump default pytorch version to 2.2.1 latest 2024-03-15 21:25:24 +09:00
litagin02
e42991f7e3 Remove loading bert since necessary model is loaded automatically 2024-03-15 21:10:24 +09:00
litagin02
432edcc52b Bump ver, rename configs_jp_extra to config_jp_extra for consistency 2024-03-15 12:34:54 +09:00
litagin02
3d8b60c03c Refactor 2024-03-15 12:27:46 +09:00
litagin02
73b01f7172 Add another wave dash for long symbol 2024-03-14 23:31:16 +09:00
litagin02
3141a8e341 debug logging 2024-03-13 16:26:29 +09:00
litagin02
7e3e6c55fa docs 2024-03-13 15:46:02 +09:00
tsukumi
9e5222619f Refactor: No preloading of BERT models to avoid unnecessary GPU VRAM consumption during training in the Web UI
Since the BERT features of the dataset are pre-extracted by bert_gen.py, there is no need to load the BERT model at training time.
2024-03-13 12:09:11 +09:00
litagin02
c37893a76b Add version suffix dev0 2024-03-13 11:46:56 +09:00
tsukumi
fedd019c04 Revert "Refactor: No preloading of BERT models to avoid unnecessary GPU VRAM consumption during training in the Web UI"
This reverts commit e8a76e547b.
2024-03-12 19:01:45 +00:00
tsukumi
07d246b98b Refactor: run "hatch run style:fmt" 2024-03-12 18:27:08 +00:00
tsukumi
e8a76e547b Refactor: No preloading of BERT models to avoid unnecessary GPU VRAM consumption during training in the Web UI
Since the BERT features of the dataset are pre-extracted by bert_gen.py, there is no need to load the BERT model at training time.
2024-03-12 18:22:34 +00:00
tsukumi
483bc68d57 Refactor: unify invoke format of open() function 2024-03-12 18:00:51 +00:00
tsukumi
74af2c831c Add: cache_dir and revision optional arguments to load_model() / load_tokenizer() 2024-03-12 17:45:10 +00:00
litagin02
f12f20f3da Rollback of SAFE_STDOUT debug 2024-03-12 19:13:13 +09:00
litagin02
4acfc2977e Ensure to write use_jp_extra option to config.json 2024-03-12 19:10:43 +09:00
litagin02
005706a456 Fix: colab notebook for 2.4 2024-03-12 17:26:03 +09:00
litagin02
b3cc705caa Fix: add use_jp_extra parameter to config.json (for non-jp-extra training) 2024-03-11 17:51:55 +09:00
litagin02
44851a6219 Clean and fix docs 2024-03-11 17:05:42 +09:00
litagin02
dada0af2b6 Format import using isort --profile black --gitignore --lai 2 . 2024-03-11 12:37:51 +09:00
litagin02
c776c08235 Apply black formatter 2024-03-11 09:47:47 +09:00
litagin02
42ee7d7608 Fix: ensure encoding utf-8 2024-03-11 09:27:36 +09:00
tsukumi
7f02b0f1d5 Refactor: TTSModelInfo changed from TypedDict to Pydantic model
Pydantic models are more robust and properties can be accessed by dots.
2024-03-10 19:21:22 +00:00
tsukumi
859d940916 Fix: failed to start training 2024-03-10 19:15:24 +00:00
tsukumi
be265d42ed Improve: switch pyworld to pyworld-prebuilt and enable it by default
Prebuilt wheels for almost every OS/architecture (except musl) are now available on PyPI, eliminating the need for a build environment.
ref: https://pypi.org/project/pyworld-prebuilt/
2024-03-10 18:11:15 +00:00
tsukumi
9c233630ef Refactor: don't keep models in bert_feature module for each language
BERT models and tokenizers are already stored and managed in the bert_models module and should not be stored here.
In addition, since there may be situations where the user would like to use cpu instead of mps for inference when using it as a library, the automatic switching process to mps was removed.
2024-03-10 14:18:57 +00:00
tsukumi
84b1dbe1b5 Fix: problem with test failures
Style-Bert-VITS2 has been reported to not work with some PyTorch 2.2 series, but Python 3.12 is only supported in Torch >= 2.2, so Python 3.12 support is not provided for the time being
2024-03-10 10:48:21 +00:00
tsukumi
afff154da4 Add: test code for style-bert-vits2 as a library
By executing "hatch run test:test", you can check whether the test passes in all Python 3.9 to 3.12 environments.
2024-03-10 04:18:39 +00:00
tsukumi
d2fd378b56 Refactor: rename Model / ModelHolder to TTSModel / TTSModelHolder for clarification and add comments to each method 2024-03-10 03:47:17 +00:00
tsukumi
b7d7c78203 Refactor: when pyopenjtalk_worker is called without initialization, continue processing without a worker
When using style-bert-vits2 as a library, the requirement to be able to launch it in multiple processes may not be necessary. Also, if the library is embedded and exe-ed using PyInstaller or similar, it is difficult to make pyopenjtalk_worker run in a separate process.
Therefore, we changed it so that the worker is used only when it is explicitly initialized.
2024-03-10 03:04:27 +00:00
tsukumi
a79b1910fb Add: use hatch to build style-bert-vits2 as a library 2024-03-09 18:38:16 +00:00
tsukumi
0a74fe521b Merge branch 'dev' of github.com:litagin02/Style-Bert-VITS2 into dev 2024-03-09 18:12:56 +00:00
tsukumi
1d320915e0 Refactor: make tts_model.py independent of style_gen.py 2024-03-09 18:10:25 +00:00
tsukumi
96d22102f3 Refactor: separate adjust_voice() function from tts_model.py 2024-03-09 17:45:56 +00:00
tsukumi
61e2a1deae Refactor: add type hints to style_bert_vits2.models.utils 2024-03-09 17:26:42 +00:00
tsukumi
98ab8e7978 Refactor: separate module for utilities related to loading/saving checkpoints and safetensors 2024-03-09 15:58:57 +00:00
tsukumi
c594f7ea7a Refactor: change execution location of pyopenjtalk.initialize()
Considering library design, this function with many side effects should not be executed in a library.
2024-03-09 00:26:51 +00:00
tsukumi
8feef04cef Refactor: add type hints to models.py / models_jp_extra.py
I didn't add docstring because it is very technical code and I don't understand what is being implemented.
2024-03-08 23:52:44 +00:00