Cognitive PHP Voice Recognition: Recognize voices in audio with Microsoft Azure API

Recommend this page to a friend!
  Info   Documentation   View files (5)   Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-06-15 (1 month ago) Not yet rated by the usersTotal: 97 This week: 3All time: 9,417 This week: 69
Version License PHP version Categories
microsoft_azure_cogn 1.0.0The PHP License5PHP 5, Web services, Audio, Artificia...
Description Author

This package can recognize voices in audio with Microsoft Azure API.

It can send HTTP requests to the Web server of the Microsoft Azure Cognitive Services API to perform operations to help verifying people's voices in audio samples. Currently it can:

- Create an audio verification profile
- Send an audio sample to train the system to recognize the people in that are speaking
- Verify the person that is speaking in a audio sample
- Convert audio samples to the WAV format, so those can be used by the Microsoft Azure Speak Recognition system

Innovation Award
PHP Programming Innovation award nominee
June 2020
Number 5
Voice recognition is a modern way to help users to interact with computer based systems using their voices, thus avoiding the need to use keyboards or mouse devices.

This package can be used to recognize authorized user voices using Microsoft Azure API.

Manuel Lemos
Picture of uche
Name: uche <contact>
Classes: 2 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 410433 in Nigeria Nigeria
Week rank: 37 4 in Nigeria Nigeria
Innovation award
Innovation award
Nominee: 2x



A PHP Wrapper for Microsoft Azure Cognitive Services

  1. Run Composer install to install packages
  2. Copy .env.example to .env and set the appropriate values. - For speaker verification, you can get the SPEECH_KEY and SPEECH BASE_URL from your Microsoft Azure acccount.

Speaker Verification

  1. Install FFMPEG To allow you convert audio files to wav format. For ubuntu, sudo apt install ffmpeg. See
  2. Initiate a Speech object - $speaker = new Speech()
  3. Create Verification Profile - $speaker->createVerificationProfile()
  4. Enrol a Verification Profile - $speaker->enrolVerificationProfile($audio, $verification_id) - $audio is the audio file in wav format and $verification_id is the id of the speaker - To convert to wav format, $speaker->convertAudio($audio)
  5. Verify Speaker - $speaker->verifySpeaker($audio, $verification_id) - $audio is the audio file in wav format and $verification_id is the id of the speaker - To convert to wav format, $speaker->convertAudio($audio)

Details Microsoft Azure Speaker Recognition can be found here:

File Role Description
.env.example Data Auxiliary data
composer.json Data Auxiliary data
composer.lock Data Auxiliary data Doc. Documentation
speech.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:3
All time:9,417
This week:69

For more information send a message to info at phpclasses dot org.