Published on 2005-08-14 09:13:23

Navigation module

The naviguation module is an advanced PHP Voice Plugin allow to create a dynamic menu to naviguate via voice. The module can read a list of service offered by the company and the user can say : Next, previous, repeat to respectively listen to the invite of the next menu, the previous one or to repeat the current.

If the user find the suitable menu he can say : OK, to confirm his choice and run the application associated to that menu.

It will allow us to create a dynamic menu without entering in the details of the VoiceXML itself.

Usage :

Where :

[id] = form identifier

[message] = optional welcome message

[script] = table of elements to announce as services

[lang] = optional language of the module

A sample usage of this module is the following :

Notice : In this module we have fixed the destination url to service.php?cat=[cat]

Part 1 Coding : Announce text

With the naviguation module we have finished a first part of the application, we'll join the previous example with our database and try to see the result :

As you notice we separated configuration part so it could be easily changed. In this example we have used  UTF-8 encoding, to avoid any error we can add an utf8_encode() to data retrieved from database, or we can force a different encoding :

Our first part is finished, we can start interact with PHP VoiceXML application to see the result :


S : Serveur / H : Humain

S = Welcome to PHP Voice News.

I'll list the services we offer.

You can say next, previous, or repeat, to move through the list.

When you hear the one you want, just say select.

S break

S = Latest news

H = Next

S = Products

H = Select

S = You selected service Products.

S redirect to service.php?cat=2.

Previous Page


Related Entries

Member of the PHP Magazine Network, Copyright (C) 2005-2008 phpmagazine.net All Rights Reserved