From 7f88cc9e0c6bd01ea3aa3b9492ede7830d20253b Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Thu, 8 Jun 2023 12:05:30 +0000 Subject: [PATCH] en frontend unit text --- tests/unit/tts/test_enfrontend.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/unit/tts/test_enfrontend.py diff --git a/tests/unit/tts/test_enfrontend.py b/tests/unit/tts/test_enfrontend.py new file mode 100644 index 000000000..4f8c49305 --- /dev/null +++ b/tests/unit/tts/test_enfrontend.py @@ -0,0 +1,28 @@ +# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from paddlespeech.t2s.frontend.en_frontend import English as EnFrontend + +if __name__ == '__main__': + + fe = EnFrontend() + + text = "AI for Sceience" + phonemes = fe.phoneticize(text) + print(text) + print(phonemes) + + text = "eight" + phonemes = fe.phoneticize(text) + print(text) + print(phonemes)