📄 scripting_8_3__the_sendpraat_directive.html
字号:
<html><head><meta name="robots" content="index,follow">
<title>脚本 8.3. 通过sendpraat语句</title></head><body bgcolor="#FFFFFF">
<table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
脚本 8.3. 通过sendpraat语句
</b></font></table></table>
<p>
除子程序(<a href="Scripting_8_1__The_sendpraat_subroutine.html">脚本 8.1. 通过sendpraat子程序</a>)和程序(<a href="Scripting_8_2__The_sendpraat_program.html">脚本 8.2. 通过sendpraat程序</a>)等方式外,还可以从Praat脚本中调用<a href="sendpraat.html">sendpraat</a>。</p>
<h3>
示例 1:结束程序</h3>
<p>
假定正在使用Praat外壳程序、词典浏览工具<b>Als</b>,现在打算结束掉Praat外壳程序、语音学研究工具<b>Praat</b>:</p>
<code>
sendpraat Praat Quit<br></code>
<h3>
示例 2: 播放一段声音</h3>
<p>
假定正在使用Praat外壳程序、词典浏览工具<b>Als</b>,现在想知道一段<i>声音</i>是什么样的。为了播放声音文件,可以从这个程序发送消息给有能力处理声音的Praat外壳程序<b>Praat</b>:</p>
<code>
fileName$ = "hallo.wav"<br></code>
<code>
sendpraat Praat<br></code>
<code>
...'newline$' Read from file... 'fileName$'<br></code>
<code>
...'newline$' Play<br></code>
<code>
...'newline$' Remove<br></code>
<p>
上面第一个<code>newline$</code>是多余的,但这样书写看起来比较好。</p>
<h3>指向本页的链接</h3>
<ul>
<li><a href="Scripting.html">脚本</a>
<li><a href="Scripting_8__Controlling_Praat_from_another_program.html">脚本 8. 用其他程序控制Praat</a>
</ul>
<hr>
<address>
<p>© ppgb, December 18, 2002</p>
<p>© 翻译:徐清白,2005年06月30日</p>
</address>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -