Update README.md
Browse files
README.md
CHANGED
@@ -75,6 +75,7 @@ import torch
|
|
75 |
from parler_tts import ParlerTTSForConditionalGeneration
|
76 |
from transformers import AutoTokenizer
|
77 |
import soundfile as sf
|
|
|
78 |
|
79 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
80 |
|
@@ -84,6 +85,7 @@ tokenizer = AutoTokenizer.from_pretrained("2121-8/japanese-parler-tts-large-bate
|
|
84 |
prompt = "こんにちは、今日はどのようにお過ごしですか?"
|
85 |
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."
|
86 |
|
|
|
87 |
input_ids = tokenizer(description, return_tensors="pt").input_ids.to(device)
|
88 |
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
|
89 |
|
|
|
75 |
from parler_tts import ParlerTTSForConditionalGeneration
|
76 |
from transformers import AutoTokenizer
|
77 |
import soundfile as sf
|
78 |
+
from rubyinserter import add_ruby
|
79 |
|
80 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
81 |
|
|
|
85 |
prompt = "こんにちは、今日はどのようにお過ごしですか?"
|
86 |
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."
|
87 |
|
88 |
+
prompt = add_ruby(prompt)
|
89 |
input_ids = tokenizer(description, return_tensors="pt").input_ids.to(device)
|
90 |
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
|
91 |
|