= TTSTextNormalizer().english_cleaners
text_normalizer = AlignerWAV2VEC2(text_normalizer, device='cpu') # for CI on cpu
aligner = "../data/en/LibriTTS/test-clean/1089/134686/1089_134686_000015_000001.wav"
wav_path = "../data/en/LibriTTS/test-clean/1089/134686/1089_134686_000015_000001.original.txt"
txt_path = torchaudio.load(wav_path)
wav, sr with open(txt_path, 'r') as f: txt = f.read()
= aligner.get_alignments(wav, txt) alignments
Aligners
Collection of Aligner models
Wav2Vec2.0 Aligner
AlignerWAV2VEC2
AlignerWAV2VEC2 (text_normalizer, device='cuda')
Initialize self. See help(type(self)) for accurate signature.
Point
Point (token_index:int, time_index:int, score:float)
Segment
Segment (label:str, start:int, end:int, score:float)