0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Mac】文字を読み上げる方法【say】

Posted at

sayコマンド

sayコマンドを使用することで文字の読み上げができます。
以下のコマンドを実行するとこんにちはが読み上げられます。

say "こんにちは"

引数を渡さない場合には標準入力から取得します。

echo "こんにちは" | say

次のように実行するとファイルの内容を読み上げます。

$ cat sample.txt 
こんにちは

$ say -f sample.txt

再生速度を変更するには-rを使用します。

say -r 200 "こんにちは"

また読み上げる音声を変更できます。
次のコマンドはKyokoこんにちはを読み上げます。

say -v 'Kyoko' "こんにちは"

使用できる音声一覧を表示するには次のコマンドを実行します。

$ say -v '?'
Albert              en_US    # I have a frog in my throat. No, I mean a real frog!
Alice               it_IT    # Salve, mi chiamo Alice e sono una voce italiana.
Bells               en_US    # Time flies when you are having fun.
Boing               en_US    # Spring has sprung, fall has fell, winter's here and it's colder than usual.
Bubbles             en_US    # I sure like being inside this fancy computer
Carmit              he_IL    # שלום. קוראים לי כרמית, ואני קול בשפה העברית.
Cellos              en_US    # Doo da doo da dum dee dee doodly doo dum dum dum doo da doo da doo da doo da doo da doo da doo
Damayanti           id_ID    # Halo, nama saya Damayanti. Saya berbahasa Indonesia.
Daniel              en_GB    # Hello, my name is Daniel. I am a British-English voice.
Daria               bg_BG    # Здравей, казвам се Дария и съм български глас.
Wobble              en_US    # I sure like being inside this fancy computer
Jester              en_US    # Please stop tickling me!
Ioana               ro_RO    # Bună, mă cheamă Ioana. Sunt o voce românească.
Jacques             fr_FR    # Bonjour, je m’appelle Jacques.
Joana               pt_PT    # Olá, chamo-me Joana e dou voz ao português falado em Portugal.
Junior              en_US    # My favorite food is pizza.
Kanya               th_TH    # สวัสดีค่ะ ดิฉันชื่อกันยา
Karen               en_AU    # Hello, my name is Karen. I am an Australian-English voice.
Kathy               en_US    # Isn't it nice to have a computer that will talk to you?
Kyoko (Enhanced)    ja_JP    # こんにちは! 私の名前はKyokoです。
Kyoko               ja_JP    # こんにちは、私の名前はきょうこです。日本語の音声をお届けします。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?