Skip to content

Commit

Permalink
fix tone, update readme (#2335)
Browse files Browse the repository at this point in the history
  • Loading branch information
yt605155624 authored Aug 31, 2022
1 parent cb74803 commit 5d5888a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/other/g2p/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Run the command below to get the results of the test.
./run.sh
```

The `avg WER` of g2p is: 0.024169315564825305
The `avg WER` of g2p is: 0.024075726733983775

```text
,--------------------------------------------------------------------.
| ./exp/g2p/text.g2p |
|--------------------------------------------------------------------|
| SPKR | # Snt # Wrd | Corr Sub Del Ins Err S.Err |
| Sum/Avg| 9996 299181 | 97.6 2.4 0.0 0.0 2.4 49.2 |
| Sum/Avg| 9996 299181 | 97.6 2.4 0.0 0.0 2.4 49.0 |
`--------------------------------------------------------------------'
```
4 changes: 1 addition & 3 deletions paddlespeech/t2s/frontend/tone_sandhi.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ def _neural_sandhi(self, word: str, pos: str,
if j - 1 >= 0 and item == word[j - 1] and pos[0] in {"n", "v", "a"}:
finals[j] = finals[j][:-1] + "5"
ge_idx = word.find("个")
if (len(word) > 1 and word[-1] in "吧呢啊呐噻嘛吖嗨呐哦哒滴哩哟喽啰耶喔诶") or (
len(word) > 1 and word[-2] in '好是帅酷棒衰烂臭狗糗' and
word[-1] == '额') or (len(word) == 1 and word[-1] in "额嗯"):
if len(word) >= 1 and word[-1] in "吧呢啊呐噻嘛吖嗨呐哦哒滴哩哟喽啰耶喔诶":
finals[-1] = finals[-1][:-1] + "5"
elif len(word) >= 1 and word[-1] in "的地得":
finals[-1] = finals[-1][:-1] + "5"
Expand Down

0 comments on commit 5d5888a

Please sign in to comment.