Update README.md
Browse files
README.md
CHANGED
@@ -73,6 +73,7 @@ import torch
|
|
73 |
from parler_tts import ParlerTTSForConditionalGeneration
|
74 |
from transformers import AutoTokenizer
|
75 |
import soundfile as sf
|
|
|
76 |
|
77 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
78 |
|
@@ -82,6 +83,8 @@ tokenizer = AutoTokenizer.from_pretrained("2121-8/japanese-parler-tts-mini-bate"
|
|
82 |
prompt = "こんにちは、今日はどのようにお過ごしですか?"
|
83 |
description = "A female speaker with a slightly high-pitched voice delivers her words at a moderate speed with a quite monotone tone in a confined environment, resulting in a quite clear audio recording."
|
84 |
|
|
|
|
|
85 |
input_ids = tokenizer(description, return_tensors="pt").input_ids.to(device)
|
86 |
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
|
87 |
|
|
|
73 |
from parler_tts import ParlerTTSForConditionalGeneration
|
74 |
from transformers import AutoTokenizer
|
75 |
import soundfile as sf
|
76 |
+
from rubyinserter import add_ruby
|
77 |
|
78 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
79 |
|
|
|
83 |
prompt = "こんにちは、今日はどのようにお過ごしですか?"
|
84 |
description = "A female speaker with a slightly high-pitched voice delivers her words at a moderate speed with a quite monotone tone in a confined environment, resulting in a quite clear audio recording."
|
85 |
|
86 |
+
|
87 |
+
prompt = add_ruby(prompt)
|
88 |
input_ids = tokenizer(description, return_tensors="pt").input_ids.to(device)
|
89 |
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
|
90 |
|