Skip to content

Commit

Permalink
[ci skip] whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
Jemoka committed Jan 28, 2025
1 parent 57b39ef commit 4e3bc09
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions batchalign/pipelines/asr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def process_generation(output, lang="eng", utterance_engine=None):

lang_2 = pycountry.languages.get(alpha_3=lang).alpha_2
def catched_num2words(i):
if not i.isdigit():
return i
try:
return num2words(i, lang=lang_2)
except NotImplementedError:
Expand Down
2 changes: 1 addition & 1 deletion batchalign/version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
0.7.10-post.3
0.7.10-post.4
Janurary 28th, 2025
numbers
20 changes: 10 additions & 10 deletions scratchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,16 +253,16 @@
########### The Batchalign String Test Harness ###########
# from batchalign.formats.chat.parser import chat_parse_utterance

# file = "/Users/houjun/Documents/Projects/talkbank-alignment/input/spanish.mp3"
# function = "asr"
# lang = "spa"
# num_speakers = 1

# ut = Document.new(media_path=file, lang=lang)
# pipeline = BatchalignPipeline.new(function, lang=lang, num_speakers=num_speakers, asr="rev")
# doc = pipeline(ut)
# doc
# # doc.content
file = "/Users/houjun/Documents/Projects/talkbank-alignment/input/spanish.mp3"
function = "asr"
lang = "spa"
num_speakers = 1

ut = Document.new(media_path=file, lang=lang)
pipeline = BatchalignPipeline.new(function, lang=lang, num_speakers=num_speakers, asr="rev")
doc = pipeline(ut)
doc
# doc.content
# # doc[0][-1]
# # doc[0][-2].model_dump()

Expand Down

0 comments on commit 4e3bc09

Please sign in to comment.