#!/bin/bash
# Gets pronuaciation of a japanese word from Forvo and pipes it to an audio player
# Author: Adrian Rivera Balasquide

lang='ja'
word=$1

filepath=$(curl -s https://forvo.com/search/$word/$lang | grep -m 1 'play_' | cut -d',' -f2)

curl -s https://forvo.com/player-mp3Handler.php?path=$filepath | mpv - 
