A python-based GUI app for practicing speech shadowing. Speech shadowing is a language learning method that has you listen to native speakers, then repeat what they say, and compare. This lets you practice things like: pronunciation, accent, pitch, and generally get more used to speaking your target language.
This app keeps things simple. You can upload "Target Audio" (the audio with a native speaker), select the audio you want from the list, play it, record yourself saying it, and then play back the native speaker and your version back-to-back, for comparison.
The one extra feature that can be nice is that it also has a "Split on Silence" feature. This can take longer audio (e.g. a podcast in the target language), and split it down into individual sentences or phrases, based on silence in the audio. It's certainly not perfect, and if you want exact splits of audio, I'd suggest manually splitting it using audacity or other audio-manipulation programs. However, it can help create "basically correct" splits, and is nice as a first-try splitting the audio.
The audio is stored in two separate files, inside the same directory that the program is running in. One is called "TargetAudio", and one is called "RecordedAudio".
In the allbuilds folder, there are separate folders for each operating system. Look for your operating sytem version, and open that folder. There you will find a SpeechShadowApp executable and a README.MD file (a copy of this one). Download both and place where you want. Double click the SpeechShadowApp to run it on your computer.
If there is not a folder that matches your operating system in the allbuilds folder, that means I have not tested the app on your system yet. Instead follow the instructions under "Tech Notes"
Go to File->"Upload Target Audio" and navigate in your filesystem to where you have the audio. You can select multiple audio files at once. Currently this program works with MP3 and WAV audio formats.
If you want, you can also upload target audio by manually copying MP3 or WAV files directly into the "TargetAudio" folder that is created in the same directory that the program is running in. The "Target Audio List" will not update until the next time you restart the program, however.
The "Target Audio List" displays all target audio you currently have uploaded. Click on the target audio you want to practice, then click "Play Target Audio" to playback the audio. Play it as many times as you want. When you want to record yourself, click "Start/Stop Recording", say the phrase or sentence, then click "Start/Stop Recording" again. To compare yourself with the target audio, click "Play Both Audio". It will then play the target audio, followed by your recorded audio. Repeat this process until you sound the same, then move on to another target audio selection.
To delete a target audio, select it in the "Target Audio List". Then go to File->"Delete Selected Target Audio". There is no confirmation pop-up, it will simply delete it, so be sure you select the correct target audio to delete.
If you have a longer audio that you want to split into individual sentences or phrases, you can try splitting the audio on silences. Select the target audio from the "Target Audio List", then go to File->"Split Target Audio On Silences". This can take a while for longer audio (really anything over a couple minutes will take a while), so be patient.
The default definition of "silence" is anything under -36dB, and requires the silence to be 1 second long in order to split the audio at that point. To update what's defined as "silence", Update Silence dBS
It will generate audio files in the target audio list area with the format: [original target audio filename]-auto-chunk[number].mp3
To update what the default definition of "silence" is when splitting target audio, go to "File"-> "Update Silence Threshold". This opens up a popup window that you can enter a new value. It must be a valid whole number, and is in dBS. If you attempt to split a target audio, and it splits too often, change it to a more negative number (e.g. -50). If you attempt to split target audio and it doesn't split the audio enough, make it a less negative number (e.g. -20).
- Start/Stop recording - Space bar
- Listen to target audio - Enter
- Navigate Target Audio List - Up/Down arrow keys
- Listen to target and recorded audio - Right Ctrl key
You'll need ffmpeg on your computer, as well as python3. Clone the repo either by using git
, or download a zip and unzip on your machine. Open a bash terminal, navigate to where you unzipped the files, and run the code by typing python3 main.py
To generate a single-file executable, make sure you have pyinstaller on your machine (if you have pip, pip3 install pyinstaller
should work), download this repo, and then type the following command:
pyinstaller -n SpeechShadowApp main.py
This will create a folder /dist/SpeechShadowApp that contains an executable called SpeechShadowApp.
If you run a linux machine, you can run the publishLinux.sh
script to generate a build for your version of Linux. First make sure the pyinstaller is on your computer, then:
- Clone repo
- Inside the cloned repo, type open a console and run
chomd +x ./publishLinux.sh
to make the file executable - Run the script
./publishLinux.sh
- inside the allbuilds folder you should find a folder with your Linux version on it, open it and the SpeechShadowApp executable will be there. If you don't know what version of linux you have, run
lsb_release -ds