applying voice print enrollment and scoring using command line (cmd) - YonathanGong/Yonathan-Wiki GitHub Wiki

This is a short guide written in order to organize the knowledge about how to run the voice print model enrollment functions through the command line:

--- Before you begins, please follow the following instructions---

  1. First we should download the calls audio files and their corresponding segments text files. this could be done in 3 methods:
  • Manually - by entering the S3 website and browsing to the needed folder- this is the quickest methods for dowanloading files if a single call.
  • Swagger - By using the swagger under "calls-export-controller". use first option ({call-id}) to download a single call and the second option (listed) to download several callsfor several calls it requires uploading a .txt file where each call is in a seperate line. the downloaded file will be uploaded to a temperary location on S3, listed on the swagger from which you can download it to your computer (you can use clowdberry for that). Pat attention that in some cases you'll have to manually covert the segment files from csv format to txt
  • Command prompt - using cmd use the following syntax: aws s3 sync --dryrun <s3 path beginning with s3://> <local path>, for example: aws s3 sync --dryrun s3://gong-transient-data/Processor/4153930443137466670/4mxypuxz8pk4aebszpa/SpeakerVerification/2018-05-14/57164 c:\temp\voiceprint\Processor/4153930443137466670/4mxypuxz8pk4aebszpa/SpeakerVerification/2018-05-14/57164.
  1. The next step is to run an enrollement on the audio files. We choose 3 files and put them in an input folder. The next step will allow us to run the enrollement on a docker image from our Windows:

docker run -v <path-to-input-folder>:/gong-input -v <path-to-output-folder>:/gong-output -w /opt/gong/app <image-name>:<tag> voice/speaker_verification/src/model/speaker_cli.py shared enroll --assigned-speaker-id <speaker-id> --input-folder /gong-input --output-folder /gong-output

for example: docker run -v C:\temp\docker_map\input-voiceprint\1240471456514515757\graeter_than_15:/gong-input -v C:\temp\docker_map\enrollments\1240471456514515757\graeter_than_15:/gong-output -v C:\temp\docker_map\logs\1240471456514515757\graeter_than_15:/gong-log -w /opt/gong/app 773717389952.dkr.ecr.us-east-1.amazonaws.com/gong_speaker_verification:latest voice/speaker_verification/src/model/speaker_cli.py shared enroll --assigned-speaker-id 1240471456514515757 --input-folder /gong-input --output-folder /gong-output

  1. The following stage will be to score calls using the new enrollement: the syntax, here too ran in cmd is: docker run -v <path-to-input-folder>:/gong-input -v <path-to-output-folder>:/gong-output -v <path-to-model's-ivectors-folder>:/gong-model -w /opt/gong/app 773717389952.dkr.ecr.us-east-1.amazonaws.com/gong_speaker_verification:latest voice/speaker_verification/src/model/speaker_cli.py shared score --enroll_folder /gong-model --input-folder /gong-input --output-folder /gong-output

for example: docker run -v C:\temp\docker_map\input-voiceprint\1240471456514515757:/gong-input -v C:\temp\docker_map\scores\1240471456514515757\graeter_than_15:/gong-output -v C:\temp\docker_map\enrollments\1240471456514515757\graeter_than_15\ivector:/gong-model -w /opt/gong/app 773717389952.dkr.ecr.us-east-1.amazonaws.com/gong_speaker_verification:latest voice/speaker_verification/src/model/speaker_cli.py shared score --enroll_folder /gong-model --input-folder /gong-input --output-folder /gong-output

this you can done to any group of audio files for enrollement and scoring, and that way to compare different emnrollement and there success.


⚠️ **GitHub.com Fallback** ⚠️