1
0

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 3 years have passed since last update.

Macの音声読み上げ機能を限界を超えて爆速にする方法(自己責任)

Last updated at Posted at 2020-04-23

2020/10/21追記

OSのアップデートでこちらの編集方法では編集できなくなったため、以下のコマンドを使用して、plistファイルを編集するのが良いです。
Mac PlistBuddyコマンドを使ってplistファイルを自由に編集しよう - Qiita

plistファイルの探索

関係してそうなファイルを調べる

find ~/ | grep -F 'speech' | grep 'plist$'

com.apple.speech.voice.prefs.plistというファイルが見つかった。

plutilコマンドを使って中身を見る。

plutil -p ~/Library/Preferences/com.apple.speech.voice.prefs.plist

該当するっぽいところが見つかった。

  "VoiceRateDataArray" => [
    0 => [
      0 => 1886745202
      1 => 369275107
      2 => 360
    ]
    1 => [
      0 => 1886745202
      1 => 369275117
      2 => 360
    ]
    2 => [
      0 => 1886745202
      1 => 184868045
      2 => 181
    ]
    3 => [
      0 => 1886745202
      1 => 369338093
      2 => 360
    ]
    4 => [
      0 => 1836346163
      1 => 2
      2 => 150
    ]
  ]

ここを書き換えれば変更できるはず。
下記のコマンドを入力。

plutil -convert json ~/Library/Preferences/com.apple.speech.voice.prefs.plist -o - | python -c 'import json, sys;d=json.load(sys.stdin);[x.__setitem__(-1, 720) for x in d["VoiceRateDataArray"]];json.dump(d, sys.stdout)' | plutil -convert binary1 -o ~/Library/Preferences/com.apple.speech.voice.prefs.plist -

killall com.apple.speech.speechsynthesisd
killall SpeechSynthesisServer

もう一度checkしてみると、変わっていますね。

  "VoiceRateDataArray" => [
    0 => [
      0 => 1886745202
      1 => 369275107
      2 => 720
    ]
    1 => [
      0 => 1886745202
      1 => 369275117
      2 => 720
    ]
    2 => [
      0 => 1886745202
      1 => 184868045
      2 => 720
    ]
    3 => [
      0 => 1886745202
      1 => 369338093
      2 => 720
    ]
    4 => [
      0 => 1836346163
      1 => 2
      2 => 720
    ]
  ]

音声も早くなっています。
設定ファイルを直接いじるので、やる場合は自己責任でどうぞ。

##参考
macos - Speed Up Rate of Text To Speech via Terminal - Super User
https://superuser.com/questions/1051883/speed-up-rate-of-text-to-speech-via-terminal

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?