如何在asp.net中应用谷歌语音?

时间:2017-07-05 16:52:17

标签: asp.net asp.net-web-api google-api google-api-dotnet-client google-text-to-speech

我尝试拨打谷歌语音。

这是我的代码:

public partial class _Default : Page
{
    const string apiString = "http://translate.google.com/translate_ttsie=UTF-8&q={0}&tl{1}";      

    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = "en";
        WindowsMediaPlayer p = new WindowsMediaPlayer();
        p.settings.volume = 100;
        p.URL=string.Format(apiString,System.Net.WebUtility.UrlEncode(TextBox1.Text),Label1.Text);
    }

它不会阅读文字。怎么办?

0 个答案:

没有答案