diff --git a/data/LibriSpeech/dev-clean-wav/3752-4944-0041.txt b/data/LibriSpeech/dev-clean-wav/3752-4944-0041.txt new file mode 100644 index 0000000..c121d5e --- /dev/null +++ b/data/LibriSpeech/dev-clean-wav/3752-4944-0041.txt @@ -0,0 +1 @@ +how delightful the grass smells \ No newline at end of file diff --git a/data/LibriSpeech/dev-clean-wav/3752-4944-0041.wav b/data/LibriSpeech/dev-clean-wav/3752-4944-0041.wav new file mode 100644 index 0000000..368057e Binary files /dev/null and b/data/LibriSpeech/dev-clean-wav/3752-4944-0041.wav differ diff --git a/data/LibriSpeech/dev-clean-wav/777-126732-0068.txt b/data/LibriSpeech/dev-clean-wav/777-126732-0068.txt new file mode 100644 index 0000000..2fbd3ac --- /dev/null +++ b/data/LibriSpeech/dev-clean-wav/777-126732-0068.txt @@ -0,0 +1 @@ +that boy hears too much of what is talked about here \ No newline at end of file diff --git a/data/LibriSpeech/dev-clean-wav/777-126732-0068.wav b/data/LibriSpeech/dev-clean-wav/777-126732-0068.wav new file mode 100644 index 0000000..99d149e Binary files /dev/null and b/data/LibriSpeech/dev-clean-wav/777-126732-0068.wav differ diff --git a/data/LibriSpeech/test-clean-wav/4507-16021-0019.txt b/data/LibriSpeech/test-clean-wav/4507-16021-0019.txt new file mode 100644 index 0000000..15e834c --- /dev/null +++ b/data/LibriSpeech/test-clean-wav/4507-16021-0019.txt @@ -0,0 +1 @@ +it is the language of wretchedness \ No newline at end of file diff --git a/data/LibriSpeech/test-clean-wav/4507-16021-0019.wav b/data/LibriSpeech/test-clean-wav/4507-16021-0019.wav new file mode 100644 index 0000000..1046021 Binary files /dev/null and b/data/LibriSpeech/test-clean-wav/4507-16021-0019.wav differ diff --git a/data/LibriSpeech/test-clean-wav/7176-92135-0009.txt b/data/LibriSpeech/test-clean-wav/7176-92135-0009.txt new file mode 100644 index 0000000..929f332 --- /dev/null +++ b/data/LibriSpeech/test-clean-wav/7176-92135-0009.txt @@ -0,0 +1 @@ +and i should begin with a short homily on soliloquy \ No newline at end of file diff --git a/data/LibriSpeech/test-clean-wav/7176-92135-0009.wav b/data/LibriSpeech/test-clean-wav/7176-92135-0009.wav new file mode 100644 index 0000000..743cfc4 Binary files /dev/null and b/data/LibriSpeech/test-clean-wav/7176-92135-0009.wav differ diff --git a/data/LibriSpeech/train-clean-100-wav/1970-28415-0023.txt b/data/LibriSpeech/train-clean-100-wav/1970-28415-0023.txt new file mode 100644 index 0000000..5b0b105 --- /dev/null +++ b/data/LibriSpeech/train-clean-100-wav/1970-28415-0023.txt @@ -0,0 +1 @@ +where people were making their gifts to god \ No newline at end of file diff --git a/data/LibriSpeech/train-clean-100-wav/1970-28415-0023.wav b/data/LibriSpeech/train-clean-100-wav/1970-28415-0023.wav new file mode 100644 index 0000000..61245aa Binary files /dev/null and b/data/LibriSpeech/train-clean-100-wav/1970-28415-0023.wav differ diff --git a/data/LibriSpeech/train-clean-100-wav/211-122425-0059.txt b/data/LibriSpeech/train-clean-100-wav/211-122425-0059.txt new file mode 100644 index 0000000..7add0a2 --- /dev/null +++ b/data/LibriSpeech/train-clean-100-wav/211-122425-0059.txt @@ -0,0 +1 @@ +and the two will pass off together \ No newline at end of file diff --git a/data/LibriSpeech/train-clean-100-wav/211-122425-0059.wav b/data/LibriSpeech/train-clean-100-wav/211-122425-0059.wav new file mode 100644 index 0000000..1425a01 Binary files /dev/null and b/data/LibriSpeech/train-clean-100-wav/211-122425-0059.wav differ diff --git a/data/LibriSpeech/train-clean-100-wav/2843-152918-0008.txt b/data/LibriSpeech/train-clean-100-wav/2843-152918-0008.txt new file mode 100644 index 0000000..6048df8 --- /dev/null +++ b/data/LibriSpeech/train-clean-100-wav/2843-152918-0008.txt @@ -0,0 +1 @@ +one day may be pleasant enough but two three four \ No newline at end of file diff --git a/data/LibriSpeech/train-clean-100-wav/2843-152918-0008.wav b/data/LibriSpeech/train-clean-100-wav/2843-152918-0008.wav new file mode 100644 index 0000000..7ba5300 Binary files /dev/null and b/data/LibriSpeech/train-clean-100-wav/2843-152918-0008.wav differ diff --git a/data/LibriSpeech/train-clean-100-wav/3259-158083-0026.txt b/data/LibriSpeech/train-clean-100-wav/3259-158083-0026.txt new file mode 100644 index 0000000..6389cbc --- /dev/null +++ b/data/LibriSpeech/train-clean-100-wav/3259-158083-0026.txt @@ -0,0 +1 @@ +i have a nephew fighting for democracy in france \ No newline at end of file diff --git a/data/LibriSpeech/train-clean-100-wav/3259-158083-0026.wav b/data/LibriSpeech/train-clean-100-wav/3259-158083-0026.wav new file mode 100644 index 0000000..d1da82f Binary files /dev/null and b/data/LibriSpeech/train-clean-100-wav/3259-158083-0026.wav differ diff --git a/data/LibriSpeech/train-clean-100-wav/3879-174923-0005.txt b/data/LibriSpeech/train-clean-100-wav/3879-174923-0005.txt new file mode 100644 index 0000000..0589ea3 --- /dev/null +++ b/data/LibriSpeech/train-clean-100-wav/3879-174923-0005.txt @@ -0,0 +1 @@ +he must vanish out of the world \ No newline at end of file diff --git a/data/LibriSpeech/train-clean-100-wav/3879-174923-0005.wav b/data/LibriSpeech/train-clean-100-wav/3879-174923-0005.wav new file mode 100644 index 0000000..6fd76a3 Binary files /dev/null and b/data/LibriSpeech/train-clean-100-wav/3879-174923-0005.wav differ diff --git a/main.py b/main.py index faee7b4..64ae33d 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,15 @@ import unicodedata import re +import tensorflow as tf + +import scipy.io.wavfile as wav + +DATA_DIR = "data/LibriSpeech/" +TRAIN_DIR = DATA_DIR + "train-clean-100-wav/" +TEST_DIR = DATA_DIR + "test-clean-wav/" +DEV_DIR = DATA_DIR + "dev-clean-wav/" + def read_text_file(path): """ @@ -88,3 +97,18 @@ def sparse_tuples_from_sequences(sequences, dtype=np.int32): shape = np.asarray([len(sequences), np.asarray(indexes).max(0)[1] + 1], dtype=np.int64) return indexes, values, shape + + +def main(argv): + # Read text file. + text_file_path = TRAIN_DIR + "211-122425-0059.txt" + text = read_text_file(text_file_path) + text = normalize_text(text) + + # Read audio file. + wav_file_path = TRAIN_DIR + "211-122425-0059.wav" + audio_rate, audio_data = wav.read(wav_file_path) + + +if __name__ == '__main__': + tf.app.run()