TensorSpeech/TensorFlowTTS

No module named 'tensorflow_tts'

nahtan-dev opened this issue · 2 comments

Hi, I've installed TensorFlowTTS with pip but it seems like it doesn't recognize it. If someone could help me please

Here is the full error:
from tensorflow_tts.inference import AutoProcessor ModuleNotFoundError: No module named 'tensorflow_tts'

Here is my code:
`import soundfile as sf
import numpy as np

import tensorflow as tf

from tensorflow_tts.inference import AutoProcessor
from tensorflow_tts.inference import TFAutoModel

processor = AutoProcessor.from_pretrained("tensorspeech/tts-tacotron2-synpaflex-fr")
tacotron2 = TFAutoModel.from_pretrained("tensorspeech/tts-tacotron2-synpaflex-fr")
mb_melgan = TFAutoModel.from_pretrained("tensorspeech/tts-mb_melgan-synpaflex-fr")

text = "Oh, je voudrais tant que tu te souviennes Des jours heureux quand nous étions amis"

input_ids = processor.text_to_sequence(text)

tacotron2 inference (text-to-mel)

decoder_output, mel_outputs, stop_token_prediction, alignment_history = tacotron2.inference(
input_ids=tf.expand_dims(tf.convert_to_tensor(input_ids, dtype=tf.int32), 0),
input_lengths=tf.convert_to_tensor([len(input_ids)], tf.int32),
speaker_ids=tf.convert_to_tensor([0], dtype=tf.int32),
)

melgan inference (mel-to-wav)

audio = mb_melgan.inference(mel_outputs)[0, :, 0]

save to file

sf.write('baka.wav', audio, 22050, "PCM_16")`

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.