This is a note-taker that can distinguish between different talkers and take down what they said sequentially.
-
Create a Python 3.x environment
-
Install required python packages in
requirements.txtpip install -r requirements.txt
-
Install
pyannotefrom develop branch of github repo -
Download and install sox , add it to
$PATH -
Download pretrained deepspeech model to
/dataand decompress it there
- Run
main,py. - Click
selectbutton and choose your inputwavfile. - Click
execbutton and the recognized text will be shown in the text editor below. - Click
clearto clear all the text.
Here is a demo video.
example usage:
import util
util.mp3_to_wav.trans_mp3_to_wav('path/to/input/mp3', 'path/to/output/wav')Example usage:
import util
import librosa
orig_data, sr = librosa.load('path/to/wav', mono=True)
segment_list = util.verification.extract_nonsilence(orig_data, min_segment_duration=1.0, samplerate=sr)where segment_list is a list of numpy.ndarray .
You can set min_segment_duration which is the minimum duration of a segment in second.
To make sure that different sentences be split, set a larger threshold . By experience, 0.002 is enough.
import util
import librosa
orig_data, sr = librosa.load('path/to/wav', mono=True)
segment_list = util.verification.extract_nonsilence(orig_data, min_segment_duration=1.0, samplerate=sr, threshold=0.002)Audio segmentation and speaker verification are implemented based on pyannote-audio .
Speech recognition is implemented based on DeepSpeech.