Page MenuHomePhabricator

Setup MariaDB for Pronlex on Horizon
Closed, ResolvedPublic

Description

  • Create wikispeech-tts-mariadb
  • Install MariaDB
  • Setup Pronlex locally to populate database
  • Populate database from Pronlex

Event Timeline

sudo apt -y update
sudo apt -y install software-properties-common gnupg2
sudo apt -y upgrade
sudo reboot

Setup your your favorite mirror: (I used Kenya for no reason. You might want something more local or more trusted.)

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64] http://mariadb.mirror.liquidtelecom.com/repo/10.4/debian buster main'
sudo apt update

Install MariaDB.

sudo apt install mariadb-server mariadb-client

Secure, but don't set a root password. Pronlex expects this (?! really ?!) and will create a user and databases further down.

sudo mysql_secure_installation

Install and setup GoLang.

sudo apt install build-essential gcc
cd ~
mkdir opt
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz -O /tmp/go1.13.linux-amd64.tar.gz
cd opt
tar xvfz /tmp/go1.13.linux-amd64.tar.gz
export GOROOT=~/opt/go
export GOPATH=~/opt/goProjects
export PATH=${GOPATH}/bin:${GOROOT}/bin:${PATH}

Install and build Pronlex.

cd ~
git clone https://github.com/wikimedia/mediawiki-services-wikispeech-pronlex.git
cd ~/mediawiki-services-wikispeech-pronlex
go build ./...

Populate MariaDB with Lexdata.

cd ~
git clone https://github.com/stts-se/wikispeech-lexdata.git
/bin/bash scripts/import.sh -a ~/appdir -e mariadb -l 'speechoid:@tcp(127.0.0.1:3306)' -f ~/wikispeech-lexdata

Profit!

(You might want to set a password for the MariaDB user Speechoid at this point)

(You can down delete all GoLang, Pronlex and Lexdata folders if you want.)

Start the Prolex in your Speechoid pointing it at this MariaDB. Something like:

/bin/bash scripts/start_server.sh -a /srv/appdir -e mariadb -l 'speechoid:password@tcp(wikispeech-tts-pronlex:3306)'