手机
当前位置:查字典教程网 >手机 >iphone教程 >Siri教你调戏Mac让它为你唱生日歌
Siri教你调戏Mac让它为你唱生日歌
摘要:方法如下:1.找到系统自带的应用脚本编辑器2.粘贴以下代码:setcurrentUsertolongusernameof(getsystem...

Siri教你调戏Mac让它为你唱生日歌1

方法如下:

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

Siri教你调戏Mac让它为你唱生日歌2

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.点击运行脚本

Siri教你调戏Mac让它为你唱生日歌3

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

set firstName to "xxx"

set lastName to "xxx"

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

Siri教你调戏Mac让它为你唱生日歌4

【Siri教你调戏Mac让它为你唱生日歌】相关文章:

教你查看iPad/iPhone电池信息

iPhone5S iOS 8.2降级到iOS 8.1.3教程

苹果iPhone6s/6s Plus配置升级的三大畅想

教你一眼辨认出iPhone5s翻新机

iPhone6Plus黑白屏幕设置方法

iphone QQ指纹解锁在哪

苹果Touch ID将拥有多种解锁方式

iphone6数据线和5s一样吗?

iPhone如何屏蔽手机广告?

iOS8五大技巧你肯定不知道

精品推荐
分类导航