Create PHP Voice Recognition Apps on the Cheap
Voice recognition is an important part of the development of advanced applications. By using this technology you can convert voice to text and vice versa. These two features significantly improve human-computer interaction. Voice recognition is widely used in personal assistant applications and software for the visually impaired.
Voice recognition or speech recognition technology is not easy to develop. In-house development would be very costly, and buying proprietary libraries that convert voice to text would make the developed application very expensive for end users. On the other hand, when developing in PHP, you have many open-source solutions available. The same dilemma happens with voice recognition in PHP -- there is an open-source class that can be used in voice applications. That way your application would cost less, and you also can offer it for free.
The second advantage of PHP is that you can easily create an application that uses text-to-speech or speech-to-text technology in Web environment. Also, the implementation of a PHP application in Web interface is cheaper since the voice recognition class is free, the database server is free and Web hosting is cheaper.
Web applications that need to convert voice to speech or vice versa are built in markup languages for voice recognition. Some commonly used markup languages are:
In order to be able to interpret the files created in one of these languages, you will need a voice browser. A voice browser is similar to a Web browser -- the only difference is that it interprets voice tags instead of HTML tags. A voice browser usually provides an interface for communication with hardware devices, such as PSTN and PBX, which are used for applications that use a telephone line, such as customer-support systems or emergency notifications. Regarding the voice browser software, there is an open-source VoiceXML interpreter -- OpenVXI. OpenVXI is available for both Windows and Linux operating systems. It requires the installation of a few libraries before installing the OpenVXI itself.
Installation requirements and other documentation can be found on the following website.
The class I will use in this article is PHP voice (it was called PHP VXML earlier). Actually, PHP voice is a package that is comprised of four classes that are used for creating voice applications in PHP:
Each class is a helper class for one markup language and allows you to create markup language files dynamically.
Why Use Voice Recognition in PHP?
Voice recognition or speech recognition technology is not easy to develop. In-house development would be very costly, and buying proprietary libraries that convert voice to text would make the developed application very expensive for end users. On the other hand, when developing in PHP, you have many open-source solutions available. The same dilemma happens with voice recognition in PHP -- there is an open-source class that can be used in voice applications. That way your application would cost less, and you also can offer it for free.
The second advantage of PHP is that you can easily create an application that uses text-to-speech or speech-to-text technology in Web environment. Also, the implementation of a PHP application in Web interface is cheaper since the voice recognition class is free, the database server is free and Web hosting is cheaper.
How Does It Work?
Web applications that need to convert voice to speech or vice versa are built in markup languages for voice recognition. Some commonly used markup languages are:
- SSML (Speech Synthesis Markup Language) -- used for speech synthesis i.e. creates artificial speech based on input text
- SRGS (Speech Recognition Grammar Specification) -- handles expected voice input patterns
- CCXML (Call Control eXtensible Markup Language) -- used for controlling telephone applications
- VoiceXML (Voice Extensible Markup Language) -- also converts text to speech
In order to be able to interpret the files created in one of these languages, you will need a voice browser. A voice browser is similar to a Web browser -- the only difference is that it interprets voice tags instead of HTML tags. A voice browser usually provides an interface for communication with hardware devices, such as PSTN and PBX, which are used for applications that use a telephone line, such as customer-support systems or emergency notifications. Regarding the voice browser software, there is an open-source VoiceXML interpreter -- OpenVXI. OpenVXI is available for both Windows and Linux operating systems. It requires the installation of a few libraries before installing the OpenVXI itself.
Installation requirements and other documentation can be found on the following website.
The class I will use in this article is PHP voice (it was called PHP VXML earlier). Actually, PHP voice is a package that is comprised of four classes that are used for creating voice applications in PHP:
- SSML 1.0
- SRGS 1.0
- CCXML 1.0
- VoiceXML 2.0
Each class is a helper class for one markup language and allows you to create markup language files dynamically.
Source...