Skip to content

Adding Audio Files

Chad Francis edited this page Oct 29, 2021 · 1 revision

Adding Audio Files

Prepare the audio file

  • open your desired audio file in some form of audio editing software (I recommend Audacity)
  • clean up audio file
    • clip off any unnecessary silence at beginning/end of track
    • boost amplitude (improves mouth movement accuracy)
    • filter/clip out any background noise, if possible

Save the file

  • export as a WAV file with the following settings
    • codec: PCM
    • sample rate: 22khz
    • audio channels: mono
    • bits per sample: 16

upload it

  • using sftp (or whatever mechanism you like), copy the file to the /public/sounds directory within your project

update the phrases file

  • using your favorite text editor, edit the config/phrases.json file
  • add a line for your new sound file, formatted as follows: `"[filename]": "[group]: [caption]"
  • for example, if I had a sound file called daddy.wav where Darth Vader tells Luke of his parentage... it could be formatted as "daddy":"vader: No, I am your father..."

give it a whirl

  • if it is running, restart the python app so it'll reload the phrases.json
  • in the web ui, switch to 'speak' mode
  • your new sound file entry should show up in the dropdown
  • enjoy!