Skip to content

Commit

Permalink
add sil in pauses and turn them to SP strictly
Browse files Browse the repository at this point in the history
idk man
  • Loading branch information
UtaUtaUtau committed Sep 5, 2023
1 parent 62a5568 commit 288b38a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import parselmouth as pm # speedy pitch detection
import logging # logger

pauses = ['pau', 'SP', 'AP']
pauses = ['sil', 'pau', 'SP', 'AP']

# Combined formatter for argparse to show typing and defaults
class CombinedFormatter(MetavarTypeHelpFormatter, ArgumentDefaultsHelpFormatter):
Expand Down Expand Up @@ -43,7 +43,7 @@ def length(self): # total length in seconds
def to_phone_string(self, max_sp_length = 1): # space separated phonemes
phones = []
for l in self.labels: # turn short silences to SP
p = l.phone
p = l.phone.replace('sil', 'SP')
if p == 'pau':
if l.length() <= max_sp_length:
p = 'SP'
Expand Down

0 comments on commit 288b38a

Please sign in to comment.