diff --git a/oxford_api/audio/1021_scintilla_1.mp3 b/oxford_api/audio/1021_scintilla_1.mp3 new file mode 100644 index 0000000..405db43 Binary files /dev/null and b/oxford_api/audio/1021_scintilla_1.mp3 differ diff --git a/oxford_api/audio/1081_form_1.mp3 b/oxford_api/audio/1081_form_1.mp3 new file mode 100644 index 0000000..ba76ea2 Binary files /dev/null and b/oxford_api/audio/1081_form_1.mp3 differ diff --git a/oxford_api/audio/10_abreast_1.mp3 b/oxford_api/audio/10_abreast_1.mp3 new file mode 100644 index 0000000..256d822 Binary files /dev/null and b/oxford_api/audio/10_abreast_1.mp3 differ diff --git a/oxford_api/audio/1164_bar_1.mp3 b/oxford_api/audio/1164_bar_1.mp3 new file mode 100644 index 0000000..6ef6030 Binary files /dev/null and b/oxford_api/audio/1164_bar_1.mp3 differ diff --git a/oxford_api/audio/1251_later_1.mp3 b/oxford_api/audio/1251_later_1.mp3 new file mode 100644 index 0000000..91745a6 Binary files /dev/null and b/oxford_api/audio/1251_later_1.mp3 differ diff --git a/oxford_api/audio/1263_excise_2.mp3 b/oxford_api/audio/1263_excise_2.mp3 index 8a72a29..360df04 100644 Binary files a/oxford_api/audio/1263_excise_2.mp3 and b/oxford_api/audio/1263_excise_2.mp3 differ diff --git a/oxford_api/audio/1290_pot_1.mp3 b/oxford_api/audio/1290_pot_1.mp3 new file mode 100644 index 0000000..7f605d2 Binary files /dev/null and b/oxford_api/audio/1290_pot_1.mp3 differ diff --git a/oxford_api/audio/1336_chagrin_1.mp3 b/oxford_api/audio/1336_chagrin_1.mp3 new file mode 100644 index 0000000..3cbacd4 Binary files /dev/null and b/oxford_api/audio/1336_chagrin_1.mp3 differ diff --git a/oxford_api/audio/1415_exult_1.mp3 b/oxford_api/audio/1415_exult_1.mp3 new file mode 100644 index 0000000..14d4cdb Binary files /dev/null and b/oxford_api/audio/1415_exult_1.mp3 differ diff --git a/oxford_api/audio/378_hack_1.mp3 b/oxford_api/audio/378_hack_1.mp3 new file mode 100644 index 0000000..a84ce35 Binary files /dev/null and b/oxford_api/audio/378_hack_1.mp3 differ diff --git a/oxford_api/audio/605_post_1.mp3 b/oxford_api/audio/605_post_1.mp3 new file mode 100644 index 0000000..27a47f6 Binary files /dev/null and b/oxford_api/audio/605_post_1.mp3 differ diff --git a/oxford_api/audio/622_pro_1.mp3 b/oxford_api/audio/622_pro_1.mp3 new file mode 100644 index 0000000..9cae55d Binary files /dev/null and b/oxford_api/audio/622_pro_1.mp3 differ diff --git a/oxford_api/audio/783_plethora_1.mp3 b/oxford_api/audio/783_plethora_1.mp3 new file mode 100644 index 0000000..74667d8 Binary files /dev/null and b/oxford_api/audio/783_plethora_1.mp3 differ diff --git a/oxford_api/audio/822_accession_1.mp3 b/oxford_api/audio/822_accession_1.mp3 new file mode 100644 index 0000000..e7b5115 Binary files /dev/null and b/oxford_api/audio/822_accession_1.mp3 differ diff --git a/oxford_api/audio/830_barrage_1.mp3 b/oxford_api/audio/830_barrage_1.mp3 new file mode 100644 index 0000000..cf55107 Binary files /dev/null and b/oxford_api/audio/830_barrage_1.mp3 differ diff --git a/oxford_api/format_audio_for_import b/oxford_api/format_audio_for_import new file mode 100755 index 0000000..ba85eea --- /dev/null +++ b/oxford_api/format_audio_for_import @@ -0,0 +1,13 @@ +#!/bin/sh +for file in json/*.json +do + #echo "file:$file" + no="$(echo "$file" | cut -d'_' -f1 | sed 's|json/||')" + word="$(echo "$file" | cut -d'_' --complement -f1 | sed 's/\.json$//')" + sounds="$(for audio in audio/"$no"_$word* + do + file="$(echo "$audio" | sed 's/audio\///')" + printf '[sound:%s]' "$file" + done)" + printf '%s\t%s\n' "$no" "$sounds" +done diff --git a/oxford_api/get_pronunciation b/oxford_api/get_pronunciation new file mode 100755 index 0000000..644e1e1 --- /dev/null +++ b/oxford_api/get_pronunciation @@ -0,0 +1,15 @@ +#!/bin/sh + +for file in json/*.json +do + #echo "file:$file" + no="$(echo "$file" | cut -d'_' -f1 | sed 's|json/||')" + word="$(echo "$file" | cut -d'_' --complement -f1 | sed 's/\.json$//')" + spellings="$(jq -r '.results[].lexicalEntries[].entries[].pronunciations[] | .phoneticSpelling' "$file" | awk '!seen[$0]++')" + if [ -z "$spellings" ]; then + echo "ERROR: no spelling for $word found!" + continue + fi + formatted="$(echo "$spellings" | sed 's/^/\//; s/$/\//' | sed 's/$/
/' | tr -d '\n' | sed 's/
$//')" + printf '%s\t%s\n' "$no" "$formatted" +done