From 7dc1e8b5476efc18c6eda0ce4abe92f1ecfc02f3 Mon Sep 17 00:00:00 2001 From: tuna2134 Date: Tue, 10 Sep 2024 00:07:59 +0000 Subject: [PATCH] fix bug --- sbv2_core/src/nlp.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbv2_core/src/nlp.rs b/sbv2_core/src/nlp.rs index e4c24d3..253edb6 100644 --- a/sbv2_core/src/nlp.rs +++ b/sbv2_core/src/nlp.rs @@ -16,9 +16,9 @@ pub fn cleaned_text_to_sequence( ) -> (Vec, Vec, Vec) { let phones: Vec = cleaned_phones .iter() - .map(|phone| SYMBOL_TO_ID.get(phone).unwrap()) + .map(|phone| *SYMBOL_TO_ID.get(phone).unwrap()) .collect(); - let tones: Vec = tones.iter().map(|tone| tone + 6).collect(); + let tones: Vec = tones.iter().map(|tone| *tone + 6).collect(); let lang_ids: Vec = vec![1; phones.len()]; (phones, tones, lang_ids) }