The ARPAbet gem allows you to convert notations from ARPAbet to International Phonetic Alphabet (IPA).
Add this line to your application's Gemfile:
gem "arpabet"
and run bundle
.
In Ruby then write:
require "arpabet"
Or install the gem by running:
gem install arpabet
example = "SIL_S EH0_B L_E EH0_B S_I K_I IY1_E SIL_S"
arpa = Arpabet::Parser.new(example)
puts arpa.to_ipa
puts arpa.to_unicode
You can fire up pry to try the above, or try
the command line tool arparse
, like so:
bundle exec exe/arparse -a SIL_S EH0_B L_E EH0_B S_I K_I IY1_E SIL_S
For more help on how to use the command line tool run:
bundle exec exe/arparse --help
After checking out the repo, run bin/setup
to install dependencies in a vendor directory. You then run bin/console
for an interactive prompt that will allow you to experiment with the code.
To install this gem on your local machine, run bundle exec rake install
.
Bug reports and pull requests are welcome on Avlos/arpabet.