- Home /
Text to speech for standalone?
Hi!
I am trying to make a quiz like game and I want something to read the questions. Since the player can create their own questions, why not make the computer read the questions? But I have one problem. I can't find a way to do it. I only found a solution that ONLY works on Android and I need it to work on both Windows and Mac. I tried getting System.Speech but that doesn't seem to work. So what can I do to add this feature?
Thanks in advance!
Answer by LegendWill · Mar 21, 2015 at 10:34 PM
http://answers.unity3d.com/questions/600128/text-to-speech-plugins.html
http://forum.unity3d.com/threads/text-to-speech-dll-for-win32.56038/
2 cool plugins I found
The first one is the one I also found. It is useless to me since it only works on Android. The other one only works on Windows and I need it to work on $$anonymous$$ac too.
Answer by Madhur26 · Jul 27, 2017 at 07:34 AM
using System.Collections; using System.Collections.Generic; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using System.Text.RegularExpressions;
public class TexttoSpeech : MonoBehaviour {
public AudioSource _audio;
// Use this for initialization
void Start () {
_audio = gameObject.GetComponent<AudioSource> ();
}
// Update is called once per frame
void Update () {
}
IEnumerator DownloadTheAudio(){
string url="http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=Hello%20World.&tl=En-gb";
WWW www = new WWW (url);
yield return www;
_audio.clip = www.GetAudioClip (false, false, AudioType.MPEG);
_audio.Play ();
}
public void ButtonClick(){
StartCoroutine (DownloadTheAudio ());
}
}
@Real$$anonymous$$TG Hi,
I was trying to find the solution for the Text to Speech for the android phone...Can you help me out .
Thanks in advance.
Hey I never got anything working with this so I can't help you, unfortunately.
Unfortunately, I did not find any solutions for this.
Answer by tonic · Aug 11, 2017 at 07:12 AM
If a robotic-type of voice is enough, then you could use this new asset:
It works probably on all platforms targeted by Unity and it's really small as well.
Your answer
![](https://koobas.hobune.stream/wayback/20220613190850im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do i use the Text to Speech ?? 1 Answer
Speech to text 2 Answers
Text to Speech in a web player build 2 Answers
Text to speech using google API issue related to black space. 1 Answer
Big text field GUI. 1 Answer