Help us understand the problem. What is going on with this article?

音声認識 Julius 4.2.3 + Mac OSX Mountain Lion 10.8.4 でビルドする方法

More than 5 years have passed since last update.

音声認識 Julius 4.2.3 + Mac OSX Mountain Lion 10.8.4 でビルドする方法です。

gcc バージョンの確認
% gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
portaudio のインストール

http://www.portaudio.com/download.html から stable の pa_stable_v19_20111121.tgz をダウンロード。

ビルド方法
Julius は 32 ビットでないと動かないっぽいので32ビットでビルドする。

% tar -xzf ~/Downloads/pa_stable_v19_20111121.tgz
% cd portaudio
% env CFLAGS='-arch i386' LDFLAGS='-arch i386' ./configure --disable-mac-universal

ここで Makefile の CFLAGS から -Werror を削除する。

さらに vi include/pa_mac_core.h で以下のように編集する。

- #include <AudioUnit/AudioUnit.h>
- //#include <AudioToolbox/AudioToolbox.h>
+ #include <CoreAudio/CoreAudio.h>

ビルド&インストール作業

% make
% sudo make install
Julius のインストール

つづいて Julius のインストール。
最新版の 4.2.3 をダウンロード。
http://sourceforge.jp/projects/julius/downloads/59049/julius-4.2.3.tar.gz/

% tar -xzf ~/Downloads/julius-4.2.3.tar.gz
% cd julius-4.2.3 
% env CFLAGS='-O3 -arch i386' LDFLAGS='-arch i386' ./configure --enable-words-int --with-mictype=portaudio
% make
% sudo make install
Julius ディクテーションキットで動作確認

動作確認用にディクテーションキットをインストールします。
http://sourceforge.jp/projects/julius/downloads/59050/dictation-kit-v4.2.3.tar.gz/

インストールといっても解凍するだけ

% tar -xzf ~/Downloads/dictation-kit-v4.2.3.tar.gz 

動作確認してみた。

% cd dictation-kit-v4.2.3
% julius -C fast.jconf -charconv EUC-JP UTF-8
...
Stat: adin_portaudio: audio cycle buffer length = 256000 bytes
Stat: adin_portaudio: sound capture devices:
  1 [Core Audio: Built-in Microph]
Stat: adin_portaudio: use default device
Stat: adin_portaudio: [Core Audio: Built-in Microph]
Stat: adin_portaudio: (you can specify device by "PORTAUDIO_DEV_NUM=number"
Stat: adin_portaudio: try to set default low latency from portaudio: -1918613508 msec
Stat: adin_portaudio: latency was set to 6.375000 msec
STAT: AD-in thread created
<<< please speak >>>Warning: strip: sample 0-93 has zero value, stripped
pass1_best:  ハロー は ん 。            
sentence1:  ハロー ワールド 。 
<<< please speak >>>
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした