发布于 2014-12-13 23:31:05 | 250 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Siri 苹果智能语音助手

Siri是苹果公司在其产品iphone 4S(iPad Air)上应用的一项语音控制功能。Siri可以令iPhone4S(iPad Air)变身为一台智能化机器人,利用Siri用户可以通过手机读短信、介绍餐厅、询问天气、语音设置闹钟等。Siri可以支持自然语言输入,并且可以调用系统自带的天气预报、日程安排、搜索资料等应用,还能够不断学习新的声音和语调,提供对话式的应答。


自从苹果在 iPhone 4s 上推出了 Siri 之后,很多人其实并没有将 Siri 用在“正途”上,取而代之的是无尽的调戏。那么在 Mac 上面有没有可以被调戏的呢?其实调戏说不上,让 Mac 给你唱首生日歌还是可以的,这个小技巧使用的是脚本编辑器。

方法如下:  

1.找到系统自带的应用脚本编辑器

2.粘贴以下代码:

set currentUser to long user name of (get system info)

set firstName to first word of currentUser

set lastName to last word of currentUser

set noteValues to {56, 56, 58, 56, 61, 60, 50, 56, 56, 58, 56, 63, 61, 50, 56, 56, 68, 65, 61, 60, 58, 50, 66, 66, 65, 61, 63, 61} -- F

-- set noteValues to {65, 65, 67, 65, 70, 69, 60, 65, 65, 67, 65, 72, 70, 60, 65, 65, 77, 74, 70, 69, 67, 60, 75, 75, 74, 70, 72, 70} -- D

-- set noteValues to {55, 55, 57, 55, 60, 59, 50, 55, 55, 57, 55, 62, 60, 50, 55, 55, 67, 64, 60, 59, 57, 50, 65, 65, 64, 60, 62, 60} -- E

set syllables to {"hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you", "[[slnc 500]]", "hap", "p", "birth", "day", "dear", firstName, lastName, "[[slnc 500]]", "hap", "p", "birth", "day", "to", "you"}

repeat with i from 1 to the length of noteValues

set thisValue to item i of noteValues

set thisSyllable to item i of syllables

if length of thisSyllable is less than 3 then

set speakingRate to 220

else

set speakingRate to 100

end if

say thisSyllable pitch thisValue using "Victoria" speaking rate speakingRate modulation 0

end repeat

3.点击运行脚本

4. 这里 firstName 和 lastName 被设置为当前用户的名和姓,你可以自行修改,但最好输入英文。当然你也可以把前三行换成下面这样来自己指定姓名:

set firstName to "xxx"

set lastName to "xxx"

5.如果你不喜欢这个嗓子,你还可以修改倒数第二行的 Victoria。前往系统偏好设置-听写与语音-系统嗓音-自定来选择。



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务