ichou1のブログ

主に音声認識、時々、データ分析のことを書く

音声合成メモ(tacotron2その1)

NVIDIAのtacotron2を試してみる。

GitHub - NVIDIA/tacotron2: Tacotron 2 - PyTorch implementation with faster-than-realtime inference

まずは、Pre-trainedモデルを使ってinference(推論)

「ちいさなうなぎやに」という音声を生成してみる。

text = 'chee sanah UNAGI ya knee'

sequence = np.array(text_to_sequence(text, ['english_cleaners']))[None, :]
# --> [[40 45 42 42 11 56 38 51 38 45 11 58 51 38 44 46 11 62 38 11 48 51 42 42]]

sequence = torch.autograd.Variable(
    torch.from_numpy(sequence)).cuda().long()

_, mel_outputs_postnet, _, _ = model.inference(sequence)

with torch.no_grad():
    audio = waveglow.infer(mel_outputs_postnet, sigma=0.666)


駅のアナウンス音声(英語)

text = 'Please stand behind the yellow line'