2016-04-14 5 views
0

私はいくつかのオーディオ解析のためにPraatに取り組んできました。しかし、私はPraatをPythonで使用するいくつかのライブラリを見つけ、同じことをしたいと思います。Python 2/3のPraatインテグレーション

このサイトには、praatを使用したときに抽出できる多くの機能があります。私はPythonで "統合"するための指示に従ってきました。 http://homepage.univie.ac.at/christian.herbst//python/index.html しかし、私はそれを動作させることができませんでした。 \ OSError:[Errno 2]このようなファイルやディレクトリはありません

私はまた別のライブラリ:https://pypi.python.org/pypi/python-praat-scriptsを発見しました。この(私は以下のコードを実行したとき)にもエラーを返します:OSErrorの:[errnoを13]パーミッションは、誰かが適切にPYTHONするpraatを統合する私を助けることができればそれは素晴らしいことだ

from praatinterface import PraatLoader 
pl = PraatLoader(praatpath ='/Users/user/Downloads/praat6015_mac64.dmg') 
text = pl.run_script('formants.praat', 'sample.wav', 5, 5500) 
formants = pl.read_praat_out(text) 

を否定しました。ありがとう。

答えて

0

私はあなたのツールを一切使用していませんが、あなたのpraatpath変数に問題があるようです。あなたがリンクしているページでは、Praatバイナリを指しているはずですが、あなたの例では、64ビットMacリリースのPraatアーカイブを指しています。

まずPraatをインストールする必要があります。命令はかなり標準ですが、Praatのウェブサイトからの引用:

After downloading, your web browser might open the .dmg file directly; you will then see the program Praat or Praat.app . If your browser did not open the .dmg file, then you should double-click the .dmg file in the Downloads window (or in the Downloads folder in your home directory); after double-clicking you may see the program Praat or Praat.app directly, or you may see a disk icon called Praat6016 , which when you open it will show you the program Praat or Praat.app . To install Praat, just drag the program Praat or Praat.app to your Applications folder (or anywhere else).

それが完了したら、praatpath変数は、この実行ファイルを指している必要があります。

これは2番目の例に当てはまりますが、問題は最初のものと似ている可能性があります(つまり、インストールされていないか、PATHにありません)。

+0

私はpraatをインストールしましたが、praatathコマンドは同じエラーを返します。 –

+0

'praatpath' _command_?あなたはあなたのスクリプトのオプションを意味しますか?あなたはどのような経路にそれを設定しましたか? – jja

+0

私はそれをpraatディレクトリまたはpraatプログラムがある場所に設定します –

関連する問題