Skip to content

Commit

Permalink
updated colab version
Browse files Browse the repository at this point in the history
  • Loading branch information
mase8129 committed Jun 29, 2023
1 parent fff168e commit b94f56c
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 324 deletions.
Binary file modified .DS_Store
Binary file not shown.
17 changes: 2 additions & 15 deletions 4_Model_training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,6 @@
" speech_for_predicition.append(sample[0])\n",
" break\n",
"# # normalize speechfile\n",
"print(speech_for_predicition[0].shape)\n",
"print(speech_for_predicition[0].dtype)\n",
"\n",
"\n",
"speech_for_predicition = speech_for_predicition[0]\n",
"speech_for_predicition = librosa.util.normalize(speech_for_predicition)\n",
"\n",
Expand Down Expand Up @@ -585,21 +581,12 @@
"\n",
" # for each audio file\n",
" for idx, fp in enumerate(fps):\n",
" # # if audio is not 16-bit PCM WAV\n",
" # # convert to 16-bit PCM WAV\n",
" # if librosa.load(fp)[0].dtype != np.int16:\n",
" # audio = librosa.load(fp)[0] * 32767\n",
" # audio = audio.astype(np.int16)\n",
" # # overwrite existing audio file\n",
" # write(fp, 44100, audio.astype(np.int16))\n",
" \n",
" # write audiosummary of one audio file to disk\n",
" writer = tf.summary.create_file_writer(path_audiosummary)\n",
" with writer.as_default():\n",
" \n",
" # write audio files to one variable (k, audio, channels) = (len(fps), 3*44100, 1) to tf.summary.audio\n",
" # save all audio files to one variable\n",
" \n",
" \n",
" # load audio file as tensor\n",
" file = tf.io.read_file(fp)\n",
" audio = tf.audio.decode_wav(file, desired_channels=1)\n",
"\n",
Expand Down
Loading

0 comments on commit b94f56c

Please sign in to comment.