Code Monkey home page Code Monkey logo

speechshadowing's Introduction

Speech Shadowing App

Table of Contents

  1. Intro
  2. Installation Instructions
  3. How-to
    1. Upload Target Audio
    2. Practice Speech Shadowing
    3. Delete Target Audio
    4. Split Target Audio on silences
    5. Update Silence dBS
    6. Hotkeys
  4. Tech Notes
    1. Linux Installation
    2. Generating Single-File Executables
    3. Linux Single-File Executables

Intro

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".

Installation instructions

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"

How-to

Upload Target Audio

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.

Practice Speech Shadowing

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.

Delete Target Audio

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.

Split Target Audio on silences

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

Update Silence dBS

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).

Hotkeys

  • 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

Tech Notes

Linux Installation

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

Generating Single-File Executables

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.

Linux Single-File Executables

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:

  1. Clone repo
  2. Inside the cloned repo, type open a console and run chomd +x ./publishLinux.sh to make the file executable
  3. Run the script ./publishLinux.sh
  4. 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

speechshadowing's People

Contributors

coryxie avatar dthurow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.