This commit is contained in:
tuna2134
2024-09-10 00:07:59 +00:00
parent 6762a87760
commit 7dc1e8b547

View File

@@ -16,9 +16,9 @@ pub fn cleaned_text_to_sequence(
) -> (Vec<i32>, Vec<i32>, Vec<i32>) {
let phones: Vec<i32> = cleaned_phones
.iter()
.map(|phone| SYMBOL_TO_ID.get(phone).unwrap())
.map(|phone| *SYMBOL_TO_ID.get(phone).unwrap())
.collect();
let tones: Vec<i32> = tones.iter().map(|tone| tone + 6).collect();
let tones: Vec<i32> = tones.iter().map(|tone| *tone + 6).collect();
let lang_ids: Vec<i32> = vec![1; phones.len()];
(phones, tones, lang_ids)
}