mmuodev / microsoft-azure-cognitive-php
PHP Wrapper for Microsoft Azure Cognitive Services
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 2
pkg:composer/mmuodev/microsoft-azure-cognitive-php
Requires
- guzzlehttp/guzzle: ^6.5
- vlucas/phpdotenv: ^4.1
This package is auto-updated.
Last update: 2025-12-20 01:25:32 UTC
README
A PHP Wrapper for Microsoft Azure Cognitive Services
- Run Composer install to install packages
- 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
- Install FFMPEG To allow you convert audio files to wav format. For ubuntu, sudo apt install ffmpeg. See https://ffmpeg.org/
- Initiate a Speech object
- $speaker = new Speech()
- Create Verification Profile
- $speaker->createVerificationProfile()
- 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)
- 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: https://azure.microsoft.com/en-us/services/cognitive-services/speaker-recognition/