!pip install -q condacolab
import condacolab
condacolab.install()
⏬ Downloading https://github.com/jaimergp/miniforge/releases/latest/download/Mambaforge-colab-Linux-x86_64.sh...
📦 Installing...
📌 Adjusting configuration...
🩹 Patching environment...
⏲ Done in 0:00:30
🔁 Restarting kernel...
%%capture
!conda install -c conda-forge go go-cgo -y
%%capture
!pip install --upgrade setuptools wheel
!go get github.com/sergi/go-diff
!go get github.com/stts-se/rbg2p
go: downloading github.com/sergi/go-diff v1.2.0
!git clone https://github.com/stts-se/rbg2p
Cloning into 'rbg2p'...
remote: Enumerating objects: 3918, done.
remote: Counting objects: 100% (123/123), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 3918 (delta 59), reused 77 (delta 29), pack-reused 3795
Receiving objects: 100% (3918/3918), 678.17 KiB | 2.32 MiB/s, done.
Resolving deltas: 100% (1233/1233), done.
import os
os.environ["PATH"]=f'{os.environ["PATH"]}:/root/go/bin'
%cd rbg2p
/content/rbg2p
%%writefile maori.g2p
CHARACTER_SET "aeghikmnoprtuwāēīōū"
DEFAULT_PHONEME "_"
PHONEME_DELIMITER " "

wh -> f
h -> h
k -> k
m -> m
ng -> ŋ
n -> n
p -> p
r -> ɾ
t -> t
w -> w
au -> au
ā -> 
a -> a
ē -> ɛː
e -> ɛ
ī -> 
i -> i
ō -> ɔː
o -> ɔ
ū -> ʉː
u -> ʉ
g -> 
Writing maori.g2p
!echo kaumātua | go run cmd/g2p/g2p.go ../maori.g2p
0 ERROR(S) FOR ../maori.g2p
0 WARNING(S) FOR ../maori.g2p
ALL 0 TESTS PASSED FOR ../maori.g2p
Reading input from stdin...
kaumātua	k au m aː t ʉ a
TOTAL INPUT          :       1
ERRORS               :       0
TRANSCRIBED          :       1