3

SAPI5Eliska22k用のチェコボイスをインストールしました。それはWindows7で正常に動作します。今私はWindows8を持っており、Speakメソッドを呼び出すとそれは私に与えますAttempted to read or write protected memory. This is often an indication that other memory is corrupt.

またSpeechSynthesizer、.NETSystem.Speechから使用してみました。また、音声Eliska22kがインストールされていることも確認できます(W7ではSAPI5でのみ機能します)が、起動しない例外は書き込まれません。メソッドSelectVoice("Eliska22k")プログラムで終了します。

デフォルトの音声は、デフォルトの音声でもSAPI5と同様に正常に機能します。

インストールSpeechPadしましたが、音声Eliska22kで問題なく動作します。問題がありません。

SpeechSynthesizer voice = new SpeechSynthesizer();

voice.SelectVoice("Eliska22k");// here program just exit without any exeption
voice.Rate = 2;

voice.SpeakAsync("Ahoj, jak se máš?");

SAPI5

SpVoice voice = new SpVoice();

voice.Voice = voice.GetVoices().Item(6);// index of eliska voice
voice.Rate = 2;

voice.Speak("Ahoj, jak se máš?", SpeechVoiceSpeakFlags.SVSFlagsAsync);//here occurs exeption

あなたのアイデアをありがとう。

4

2 に答える 2

0

これが答えかどうかはわかりませんが、同じメディア要素を再利用して別のストリームを何度も再生しようとすると、まったく同じエラーに遭遇しました (たとえば、ユーザーはボタン マッシングです)。解決策は、明示的な GC.Collect() を使用することでした。5つのメディア要素を持つことは、オーディオの停止と再開でスピードアップするように見えるので、ちょっといいです.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Media.SpeechSynthesis;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace SpeechMark
{
  /// <summary>
  /// An empty page that can be used on its own or navigated to within a Frame.
  /// </summary>
  public sealed partial class BlankPage1 : Page
  {
    public BlankPage1()
    {
      this.InitializeComponent();

      m_button.Click += m_button_Click;

      m_audioPlayerPool = new MediaElement[5];
      for(int index = 0; index < m_audioPlayerPool.Length; index++)
      {
        var audioPlayer = new MediaElement();
        audioPlayer.AutoPlay = true;
        m_audioPlayerPool[index] = audioPlayer;
        m_grid.Children.Add(audioPlayer);
      }

      m_textToSpeech = new SpeechSynthesizer();
    }

    async void m_button_Click(object sender, RoutedEventArgs e)
    {
      m_button.IsEnabled = false;
      if (m_audioPlayer != null)
      {
        m_audioPlayer.Stop();
      }

      if (m_stream != null)
      {
        m_stream.Dispose();
        m_stream = null;
      }

      GC.Collect();

      m_audioPlayer = m_audioPlayerPool[m_nextAudioPlayerToUse];
      m_nextAudioPlayerToUse = (m_nextAudioPlayerToUse + 1) % m_audioPlayerPool.Length;

      string ssml = "<speak version=\"1.0\" xmlns=\"http://www.w3.org/2001/10/synthesis\" xml:lang=\"en\"><voice gender=\"female\" xml:lang=\"en\"><prosody rate=\"1\">how are you doing</prosody><mark name=\"utteranceComplete\"/></voice></speak>";
      m_stream = await m_textToSpeech.SynthesizeSsmlToStreamAsync(ssml);
      m_audioPlayer.SetSource(m_stream, m_stream.ContentType);

      m_button.IsEnabled = true;
    }

    private MediaElement m_audioPlayer;
    private MediaElement[] m_audioPlayerPool;
    private int m_nextAudioPlayerToUse = 0;
    private SpeechSynthesizer m_textToSpeech;
    public SpeechSynthesisStream m_stream { get; set; }
  }
}

xaml:

<Page
    x:Class="SpeechMark.BlankPage1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SpeechMark"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid x:Name="m_grid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Button x:Name="m_button" Height="128" Margin="446,303,0,337" Width="256"/>
  </Grid>
</Page>
于 2013-12-10T07:48:19.827 に答える
0

私が知る限り、このソフトウェアはまだ Windows 8 と互換性がありません。

Xtranormal はこれらのボイス パックを開発し、テキストからアニメーションへのソフトウェアをアドオンとして使用しました。

PC Worldからこのソフトウェアのレビューをチェックすると、2.5 ベータ版の仕様が Windows XP および Windows Vista 用であったことがわかります。

PCWorld のレビューは 2010 年に行われたことに注意してください。Windows 7 のサポートは、このレビュー後に統合されました。

Windows 7 のリリースと、このソフトウェアの Windows 7 互換性へのアップグレードの遅れに注目すると、これはまだ Windows 8 に対応していないという私の主張が強まります。(windows 7 がリリースされてから 5 か月後、PC の世界がこのソフトウェアをレビューしましたが、これは windows 7 と互換性がありませんでした。windows 8 はまだリリースされていません。ソフトウェアのアップグレードには時間がかかります;))

自社の Web サイトで技術的な詳細を確認すると、最新の Windows 7 を使用する推奨セットアップが提案されています。

これは、まだ Windows 8 に更新していないことを示唆しています。

(追加の脚注として、Windows 8 でのこのソフトウェアの YouTube での単一のチュートリアルではなく、他の OS でのチュートリアルがたくさんあります。 2年の期間は、Windows 8がまだないことをもう一度示唆しています;)

脚注の注記、Software Informer は、利用可能なほぼすべてのソフトウェアがレビューされているサイトです。最新バージョンの 260 件に比べて、古いバージョンは 2 ~ 3 件のレビューを受け取っているため、既知の人気が高まっています )

脚注 2。私がソフトウェアに焦点を当てた理由は、声が最初はそのソフトウェア用に設計されていたからです. したがって、ボイスがアップグレードされる場合、最初に使用する予定だったソフトウェアが最初にアップグレードされる可能性があります)。

どこかのサイトで、サポートしている OS について説明しているだけだと思います:/

于 2013-01-10T15:39:33.250 に答える