comandi vocali e multimodali

documenti su applicazioni vocali e applicazioni multimodali

skip menu

simple and natural:

use your voice

VoiceXML voice applications and multimodal applications



.NET Integration

With MultiModalBerry you can, with just a few line of code, develop an application controlling your Text-to-Speech (TTS) and Automatic Speech Recognition (ASR) engines.

Speech recognition example (ASR)

the following example shows how you can with few lines:

using System;
using System.Collections.Generic;
using System.Text;
using BerryCSharp.com.dotvocal.csberry;

namespace AsrExampleCSharp
{
class Program
{
static void Main(string[] args)
{
try
{
IRecognizer recognizer = CSBerry.CreateRecognizer();
recognizer.AddGrammar("nomi.bnf");
Console.WriteLine("Please, tell me a name:");
string detto = recognizer.Listen().BestValue;
Console.Write("You said: " + detto);
}
catch (NoMatchException) { Console.Write("I didn't understand you"); }
catch (TimeOutException) { Console.Write("Time out"); }
catch (NoInputException) { Console.Write("I didn't hear you"); }
catch (BerryConfigurationError bce){ Console.Write(bce.ToString()); }
catch (GrammarException ge) { Console.Write(ge.ToString()); }
catch (AsrRecException are) { Console.Write(are.ToString()); }
catch (Exception ex) { Console.Write(ex.ToString()); }
finally { Console.Read(); }
}
}
}

Text to Speech example (TTS)

The example below shows how to use MultiModal Berry in order to:

using System;
using System.Collections.Generic;
using System.Text;
using BerryCSharp.com.dotvocal.csberry;
namespace TtsExampleCSahrp
{ class Program
{
static void Main(string[] args)
{
try
{
ISpeaker speaker = CSBerry.CreateSpeaker();
speaker.Speak("Hello World.");
speaker.Barrier();
}
catch (TtsException te)
{
Console.Write(te.ToString());
}
catch (BerryConfigurationError bce)
{
Console.Write(bce.ToString());
}
catch (Exception ex)
{
Console.Write("Errore: " + ex.ToString());
}
}
}
}