예제 #1
0
    public override void DrawOptions <TOptions>(TOptions serviceOptions)
    {
        this.serviceOptions = serviceOptions as SpeechLibTTSOptions;

        DrawExplanationLabel();

        DrawVoicePopup();

        GUILayout.Space(20);

        DrawRateField();

        DrawVolumeField();
    }
예제 #2
0
    public override void Initialize(TextToSpeechOptions ttsOptions)
    {
        if (ttsOptions.GetType() == typeof(SpeechLibTTSOptions))
        {
            windowsTTSOptions = (SpeechLibTTSOptions)ttsOptions;

            SpObjectTokenCategory tokenCat = new SpObjectTokenCategory();
            tokenCat.SetId(SpeechLib.SpeechStringConstants.SpeechCategoryVoices, false);
            ISpeechObjectTokens tokens = tokenCat.EnumerateTokens(null, null);

            spVoice = new SpVoice();

            spVoice.Voice  = tokens.Item(windowsTTSOptions.Voice);
            spVoice.Volume = windowsTTSOptions.Volume;
            spVoice.Rate   = windowsTTSOptions.Rate;

            spFileStream = new SpFileStream();
        }
    }