<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; WSH: использование MS Agent, SAPI Automation]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=4282&amp;type=atom" />
	<updated>2010-03-30T16:55:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=4282</id>
		<entry>
			<title type="html"><![CDATA[Re: WSH: использование MS Agent, SAPI Automation]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=34218#p34218" />
			<content type="html"><![CDATA[<p>Другой пример: позволяет получить текст из файла и прочитать его, VBScript.<br /></p><div class="codebox"><pre><code>On Error Resume Next 
Path = InputBox(&quot;Введите полный путь к файлу&quot;,&quot;Чтение файлов&quot;)
If Path&lt;&gt;&quot;&quot; Then
    Set fso  = WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;)
    Set File = fso.OpenTextFile(Path,1,False)
        text = File.ReadAll
        File.Close
    Set objVoice=CreateObject(&quot;SAPI.SpVoice&quot;)
    objVoice.Speak text        
Else 
    WScript.Quit
End If</code></pre></div><p>По умолчанию используется Microsoft Sam, но можно найти в Интернете движки для чтения на русском языке.<br />Автор примера — <strong>Felix Faria</strong>.</p>]]></content>
			<author>
				<name><![CDATA[The gray Cardinal]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2</uri>
			</author>
			<updated>2010-03-30T16:55:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=34218#p34218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[WSH: использование MS Agent, SAPI Automation]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=33901#p33901" />
			<content type="html"><![CDATA[<p>Простейший пример использования Microsoft Speech API: озвучивание (автоматическое чтение) текста, JScript.<br /></p><div class="codebox"><pre><code>var Voice = new ActiveXObject(&quot;SAPI.SpVoice&quot;);
Voice.Volume = 100; Voice.Rate = 3;
Voice.Speak(&quot;hey! what&#039;s up,  doc?&quot;);</code></pre></div><p>Описание объекта <a href="http://msdn.microsoft.com/en-us/library/ms723602(VS.85).aspx">тут</a>.</p>]]></content>
			<author>
				<name><![CDATA[JSmаn]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24434</uri>
			</author>
			<updated>2010-03-21T17:58:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=33901#p33901</id>
		</entry>
</feed>
