Macのsayコマンドの一覧を取得して話させる

やってみたけどこれは面白い。

#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
os.system('ls /System/Library/Speech/Voices/ > "voicelist.txt"')
fin = open("voicelist.txt")
for f in fin:
    extracted = f.replace("Compact.SpeechVoice","").rstrip()
    extracted = extracted.replace(".SpeechVoice","").rstrip()
    sentence = "say -v "+extracted+" hello"
    print sentence
    os.system('%(sentence)s' % locals())
fin.close()

一覧。

say -v Agata hello
say -v Agnes hello
say -v Albert hello
say -v Alex hello
say -v Aylin hello
say -v BadNews hello
say -v Bahh hello
say -v Bells hello
say -v Boing hello
say -v Bruce hello
say -v Bubbles hello
say -v Cellos hello
say -v Daniel hello
say -v Deranged hello
say -v Diego hello
say -v Eszter hello
say -v Felix hello
say -v Fred hello
say -v GoodNews hello
say -v Hysterical hello
say -v Ida hello
say -v Javier hello
say -v Joana hello
say -v Junior hello
say -v Kathy hello
say -v Kyoko hello
say -v Kyoko hello
say -v Lee hello
say -v Maged hello
say -v Mikko hello
say -v Milena hello
say -v Narae hello
say -v Narisa hello
say -v Organ hello
say -v Oskar hello
say -v Paolo hello
say -v Princess hello
say -v Ralph hello
say -v Raquel hello
say -v Samantha hello
say -v Sin-Ji hello
say -v Stine hello
say -v Ting-Ting hello
say -v Trinoids hello
say -v Vicki hello
say -v Victoria hello
say -v Virginie hello
say -v Whisper hello
say -v Xander hello
say -v Ya-Ling hello
say -v Yannick hello
say -v Zarvox hello
say -v Zuzana hello


しゃべらなかったやつ。

Voice `Agata' not found.
Voice `Aylin' not found.
Voice `BadNews' not found.
Voice `Daniel' not found.
Voice `Diego' not found.
Voice `Eszter' not found.
Voice `Felix' not found.
Voice `GoodNews' not found.
Voice `Ida' not found.
Voice `Javier' not found.
Voice `Joana' not found.
Voice `Lee' not found.
Voice `Maged' not found.
Voice `Mikko' not found.
Voice `Milena' not found.
Voice `Narae' not found.
Voice `Narisa' not found.
Voice `Organ' not found.
Voice `Oskar' not found.
Voice `Paolo' not found.
Voice `Raquel' not found.
Voice `Samantha' not found.
Voice `Sin-Ji' not found.
Voice `Stine' not found.
Voice `Ting-Ting' not found.
Voice `Virginie' not found.
Voice `Xander' not found.
Voice `Ya-Ling' not found.
Voice `Yannick' not found.
Voice `Zuzana' not found.

TrinoidとZarvoxがロボットっぽくていい。

Hystericalは魔女っぽい。

say -v Hysterical Off with their heads!

”首をはねよ!!”