Giter VIP home page Giter VIP logo

tacotron-korean-tensorflow2's Introduction

Tacotron Korean TTS implementation using Tensorflow2

Requirements

  • Python 3.7
  • tensorflow 2.0 이상
  • jamo

Training

  1. 한국어 음성 데이터 다운로드

  2. ~/Tacotron-Korean-Tensorflow2에 학습 데이터 준비

    Tacotron-Korean-Tensorflow2
      |- kss
          |- 1
          |- 2
          |- 3
          |- 4
          |- transcript.v.1.x.txt
    
  3. Preprocess

    python preprocess.py
    
    • data 폴더에 학습에 필요한 파일들이 생성됩니다
  4. Train

    python train1.py
    python train2.py
    
    • train1.py - train2.py 순으로 실행합니다
    • 저장한 모델이 있으면 가장 최근의 모델을 불러와서 재학습합니다
  5. Synthesize

    python test1.py
    python test2.py
    
    • test1.py - test2.py 순으로 실행하면 output 폴더에 wav 파일이 생성됩니다

윈도우에서 Tacotron 한국어 TTS 학습하기

Tacotron 정리

tacotron-korean-tensorflow2's People

Contributors

chldkato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tacotron-korean-tensorflow2's Issues

AttributeError: module 'scipy' has no attribute 'io' 이 문제는 왜 발생하나요?

안녕하세요.

타코트론에 관심이 많아서(개발자는 아니지만 ^^;;) 하나씩 따라하다 보니 마지막 python test2.py 을 실행하고 나면

Traceback (most recent call last):
File "test2.py", line 42, in
test_step(mel, i)
File "test2.py", line 31, in test_step
scipy.io.wavfile.write(os.path.join(save_dir, '{}.wav'.format(idx)), sample_rate, wav)
AttributeError: module 'scipy' has no attribute 'io'

이러한 에러가 발생을 합니다.

텐스플로우는 최신버전이 설치되어 있습니다. (2.0 이상)

Traceback 에러

Traceback (most recent call last):
File "preprocess.py", line 28, in
sentence = text_to_sequence(sentence)
File "F:\Tacotron-Korean-Tensorflow2-master\util\text.py", line 23, in text_to_sequence
sequence.append(_symbol_to_id[s])
KeyError: '3'

위 같은 에러가
python preprocess.py 를 칠때 나타나는데 어떻해야하나요?

I am troubled with error with train1.py

When I run train1.py I got error message as below. Can you teach me how to resolve it? Thank you.
p.s. I am running this project on Windows10

2021-03-23 23:00:28.775696: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
WARNING:tensorflow:From C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\autograph\impl\api.py:330: bidirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equivalent to this API
WARNING:tensorflow:From C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\ops\rnn.py:464: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.
Instructions for updating:
Please use keras.layers.RNN(cell), which is equivalent to this API
Traceback (most recent call last):
File "train1.py", line 88, in
loss, pred, alignment = train_step(text, dec, mel, text_length)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 457, in call
result = self._call(*args, **kwds)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 503, in _call
self._initialize(args, kwds, add_initializers_to=initializer_map)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 408, in _initialize
*args, **kwds))
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\function.py", line 1848, in _get_concrete_function_internal_garbage_collected
graph_function, _, _ = self._maybe_define_function(args, kwargs)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\function.py", line 2150, in _maybe_define_function
graph_function = self._create_graph_function(args, kwargs)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\function.py", line 2041, in _create_graph_function
capture_by_value=self._capture_by_value),
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\framework\func_graph.py", line 915, in func_graph_from_py_func
func_outputs = python_func(*func_args, **func_kwargs)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\eager\def_function.py", line 358, in wrapped_fn
return weak_wrapped_fn().wrapped(*args, **kwds)
File "C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\framework\func_graph.py", line 905, in wrapper
raise e.ag_error_metadata.to_exception(e)
NotImplementedError: in converted code:

train1.py:57 train_step  *
    pred, alignment = model(enc_input, text_length, dec_input, is_training=True)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py:847 __call__
    outputs = call_fn(cast_inputs, *args, **kwargs)
D:\GitHUB\Tacotron-Korean-Tensorflow2\models\tacotron.py:54 call  *
    x = self.decoder(batch, dec_input, x)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py:891 __call__
    outputs = self.call(cast_inputs, *args, **kwargs)
D:\GitHUB\Tacotron-Korean-Tensorflow2\models\tacotron.py:32 call
    x = self.attention_rnn(x)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:623 __call__
    return super(RNN, self).__call__(inputs, **kwargs)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py:847 __call__
    outputs = call_fn(cast_inputs, *args, **kwargs)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent_v2.py:313 call
    inputs, initial_state, _ = self._process_inputs(inputs, initial_state, None)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:798 _process_inputs
    initial_state = self.get_initial_state(inputs)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:606 get_initial_state
    inputs=None, batch_size=batch_size, dtype=dtype)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:1762 get_initial_state
    return _generate_zero_filled_state_for_cell(self, inputs, batch_size, dtype)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:2752 _generate_zero_filled_state_for_cell
    return _generate_zero_filled_state(batch_size, cell.state_size, dtype)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:2770 _generate_zero_filled_state
    return create_zeros(state_size)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\keras\layers\recurrent.py:2765 create_zeros
    return array_ops.zeros(init_state_size, dtype=dtype)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\ops\array_ops.py:2349 zeros
    output = _constant_if_small(zero, shape, dtype, name)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\ops\array_ops.py:2306 _constant_if_small
    if np.prod(shape) < 1000:
<__array_function__ internals>:6 prod

C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\numpy\core\fromnumeric.py:3031 prod
    keepdims=keepdims, initial=initial, where=where)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\numpy\core\fromnumeric.py:87 _wrapreduction
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
C:\Users\lee_j\Anaconda3\envs\Lecture\lib\site-packages\tensorflow_core\python\framework\ops.py:736 __array__
    " array.".format(self.name))

NotImplementedError: Cannot convert a symbolic Tensor (tacotron/decoder/gru/strided_slice:0) to a numpy array.

Training time

Hi. How long does the training module typically take? Is there a maximum defined step-count after which the training will converge? How to utilize my gpu to run this code? should I change any configuration parameters if I use my own dataset?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.