Skip to content

Instantly share code, notes, and snippets.

@iCorv
Created October 3, 2021 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iCorv/086d2f3753a76fe5c58a03b3e9a95519 to your computer and use it in GitHub Desktop.
Save iCorv/086d2f3753a76fe5c58a03b3e9a95519 to your computer and use it in GitHub Desktop.
Load LJ Speech Dataset and extract audio data
dataset, info = tfds.load(
'ljspeech', split='train',
download=True, with_info=True)
# transform int16 audio to float32 in [-1, 1]
dataset = dataset.map(
lambda example_dict: tf.cast(
example_dict['speech'], tf.float32
) / 32767,
num_parallel_calls=AUTOTUNE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment