OpenPecha / stt-split-audio

MIT License
0 stars 0 forks source link

STT0027: script to adjust the existence of shed in transcript inference. #2

Closed gangagyatso4364 closed 6 days ago

gangagyatso4364 commented 2 weeks ago

Description

write a script to adjust the existence of shed in transcript inference in stt pecha tools. for given shed there should always be a space afterwards. this will reduce the annotator time significantly. shed occurance cases:

  1. inf_text = 'ཨ་མ་ལགས་འདི་ཨ་མ་ལགས་ཀི་ལུང་པ་དེ་ག་འདྲའི་འདྲ་བོ་ཅིག་ཡོད་རེད་ཟེ། ལུང་པ། ། ལུང་པ་ལུང་ཚ་སྤོབས་པ་རེད།' adjusted_inf_text = 'ཨ་མ་ལགས་འདི་ཨ་མ་ལགས་ཀི་ལུང་པ་དེ་ག་འདྲའི་འདྲ་བོ་ཅིག་ཡོད་རེད་ཟེ། ལུང་པ། ལུང་པ་ལུང་ཚ་སྤོབས་པ་རེད།'
  2. inf_text = 'ཨ་མ་ལགས་འདི་ཨ་མ་ལགས་ཀི་ལུང་པ་དེ་ག་འདྲའི་འདྲ་བོ་ཅིག་ཡོད་རེད་ཟེ། ལུང་པ།།ལུང་པ་ལུང་ཚ་སྤོབས་པ་རེད།' adjusted_inf_text = 'ཨ་མ་ལགས་འདི་ཨ་མ་ལགས་ཀི་ལུང་པ་དེ་ག་འདྲའི་འདྲ་བོ་ཅིག་ཡོད་རེད་ཟེ། ལུང་པ། ལུང་པ་ལུང་ཚ་སྤོབས་པ་རེད།'
  3. inf_text = 'ཨ་མ་ལགས་འདི་ཨ་མ་ལགས་ཀི་ལུང་པ་དེ་ག་འདྲའི་འདྲ་བོ་ཅིག་ཡོད་རེད་ཟེ།ལུང་པ། །ལུང་པ་ལུང་ཚ་སྤོབས་པ་རེད།' adjusted_inf_text = 'ཨ་མ་ལགས་འདི་ཨ་མ་ལགས་ཀི་ལུང་པ་དེ་ག་འདྲའི་འདྲ་བོ་ཅིག་ཡོད་རེད་ཟེ། ལུང་པ། ལུང་པ་ལུང་ཚ་སྤོབས་པ་རེད།' refer clean transcription function in : https://github.com/OpenPecha/stt-combine-datasets/blob/main/04_combine_all.ipynb

    Completion Criteria

    a script that is able to handle all three cases above:

    Implementation Plan

Subtasks

gangagyatso4364 commented 2 weeks ago

refer stt-combine-all for text cleaning and normalization script.

gangagyatso4364 commented 2 weeks ago

update stt-split-audio with the cleaned inference text.