Revert "Added dependency for analyze.py running as docker."

This reverts commit 4ce7f69455.
pull/45/head
Thorsten Mueller 2020-02-21 09:32:25 +01:00
parent 93cb8ada53
commit edeadefe75
4 changed files with 5 additions and 4 deletions

View File

@ -212,12 +212,15 @@ Example
python analyze.py --train_file_path=~/tacotron/training/train.txt --save_to=~tacotron/visuals --cmu_dict_path=~/cmudict-0.7b
```
<<<<<<< HEAD
If using Docker, you need to export your DISPLAY variable when starting the container to successfully create the image files. Also ensure that X server connections are enabled on your host system.
```
docker run -it -p 3000:3000 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix mycroft/mimic2:cpu
```
=======
>>>>>>> parent of 4ce7f69... Added dependency for analyze.py running as docker.
cmu_dict_path is optional if you'd like to visualize the distribution of the phonemes.
analyze.py outputs 6 different plots.

View File

@ -3,8 +3,6 @@ FROM tensorflow/tensorflow:1.8.0-py3
RUN mkdir /root/mimic2
COPY . /root/mimic2
WORKDIR /root/mimic2
RUN apt-get update
RUN apt-get install -y python3-tk
RUN pip install --no-cache-dir -r requirements.txt
ENTRYPOINT [ "/bin/bash" ]

View File

@ -30,7 +30,7 @@ def main():
# Create new metadata.csv for ljspeech
metadata = open(os.path.join(dir_base_ljspeech,"metadata.csv"),mode="w", encoding="utf8")
for row in c.execute('SELECT audio_id, prompt, lower(prompt) FROM audiomodel ORDER BY length(prompt)'):
for row in c.execute('SELECT DISTINCT audio_id, prompt, lower(prompt) FROM audiomodel ORDER BY length(prompt)'):
audio_file_source = os.path.join(dir_base_mrs,"backend","audio_files", uid, row[0] + ".wav")
if os.path.isfile(audio_file_source):
metadata.write(row[0] + "|" + row[1] + "|" + row[2] + "\n")

View File

@ -42,7 +42,7 @@ def build_from_path(in_dir, out_dir, num_workers=1, tqdm=lambda x: x):
wav_dir = os.path.join(in_dir,"backend","audio_files",uid)
print("Search for wav files in " + wav_dir)
for row in c.execute('SELECT audio_id, lower(prompt) FROM audiomodel ORDER BY length(prompt)'):
for row in c.execute('SELECT DISTINCT audio_id, lower(prompt) FROM audiomodel ORDER BY length(prompt)'):
wav_path = os.path.join(wav_dir, '%s.wav' % row[0])
if os.path.isfile(wav_path):
text = row[1]