I'm hoping to get text to speech working in a webplayer build using Unity Pro 3.3. I've seen the plugin on the forums and have that working in stand alone builds, but I'm trying just the most basic implementation for a webplayer: adding a .NET assembly (Interop.SpeechLib.dll) to my assets folder and attaching this script to a game object:
using UnityEngine;
using System.Collections;
using SpeechLib;
public class SkinTest : MonoBehaviour
{
void OnGUI()
{
if (GUI.Button(new Rect(Screen.width/2, Screen.height/2,120,80),"Speak!")) {
SpVoice voice = new SpVoice();
voice.Speak("Hello World!", SpeechVoiceSpeakFlags.SVSFDefault);
}
}
}
It works in a stand alone Windows build, but not in a webplayer build. I guess this is as expected since I don't think the web player includes the assembly.
Is there any way to get text to speech working in a web player build?
Thanks