• Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Download the pronunciation mp3 audio for 119,376 unique English words/terms

English Words Pronunciation MP3 Audio Download

Introduction

This is a simple Python script to download the MP3 pronunciation audio for 119,376 unique English words/terms. They will take around 2 GB on your disk in total.

The MP3 sources were obtained from the following 7 online dictionaries:

This project should have covered everything you might ever think of, from ".22 caliber" to "zinc cadmium sulfide"; from "1000000000000" to "level dependent functional magnetic resonance imaging" (YES, we have the pronunciation for this long term). If the word/term you are looking for is not in the list, it's most likely because the it didn't appear in any of the online dictionaries.

I currently don't have the intention to share the source code of my crawler framework that found these MP3 URLs. However, if there are more sites you wanna crawl but you don't know how to, ask me for help and I'll happily make a crawler for you.

Getting Started

  • Download & install Python 3
  • Install dependencies
$ pip install -r requirements.txt

Download All MP3

Just do it.

$ python3 download_all_mp3.py

This command will start a downloader with 30 threads by default.

To specify how many threads you want to use in the downloader, just pass in a positive integer as parameter:

$ python3 download_all_mp3.py 10

This will start a downloader with 10 concurrent threads.

The downloaded mp3 audio files will be stored in the download/ directory

Use data.json and ultimate.json in Other Applications

The data.json and ultimate.json file contains the URLs to the pronunciation MP3 audio files for 119,376 unique English words.

My own crawler framework took tens of hours to get all the data from the Web. Now, you can use the data directly free of charge, instead of having to spend your time and effort to write the crawler and to crawl the Web. The idea behind this project is just like rainbow tables.

The only difference between data.json and ultimate.json is, the former contains only one URL for each word/term, while the latter have all the URLs that ever appeared in all online dictionaries.

For example, a segment of the data.json file looks like:

{
	"abel": "http://static.sfdict.com/staticrep/dictaudio/A00/A0015900.mp3",
	"abele": "http://www.yourdictionary.com/audio/a/ab/abele.mp3",
	"abelia": "http://s3.amazonaws.com/audio.vocabulary.com/1.0/us/A/1IFDVKNEVQTHP.mp3",
	"abelmoschus": "http://img2.tfd.com/pron/mp3/en/US/sh/shdjdgdyslsjsfsodrsksns3h7h3.mp3",
	"abelmosk": "http://img2.tfd.com/pron/mp3/en/UK/dr/drdjdgdyslsjsfsoshgk.mp3",
	"abenaki": "http://img2.tfd.com/pron/mp3/en/US/dt/dtdjdgdysjddskslhn.mp3",
	"aberdare": "http://img2.tfd.com/pron/mp3/en/UK/df/dfdjdgdysddtdsstd7gk.mp3",
	"aberdeen": "http://www.yourdictionary.com/audio/a/ab/aberdeen.mp3"
}

While the corresponding segment in ultimate.json:

	"abel": [
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0015900.mp3",
		"http://img2.tfd.com/pron/mp3/en/US/d5/d5djdgdyslht.mp3",
		"http://img2.tfd.com/pron/mp3/en/UK/d5/d5djdgdyslht.mp3",
		"http://www.yourdictionary.com/audio/a/ab/abel.mp3"
	],
	"abele": [
		"http://www.yourdictionary.com/audio/a/ab/abele.mp3",
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0016300.mp3",
		"http://www.oxforddictionaries.com/media/english/uk_pron/a/abe/abele/abele__gb_2_8.mp3",
		"http://s3.amazonaws.com/audio.vocabulary.com/1.0/us/A/1B3JGI7ALNB2K.mp3",
		"http://www.oxforddictionaries.com/media/english/uk_pron/a/abe/abele/abele__gb_1_8.mp3"
	],
	"abelia": [
		"http://s3.amazonaws.com/audio.vocabulary.com/1.0/us/A/1IFDVKNEVQTHP.mp3",
		"http://www.oxforddictionaries.com/media/english/uk_pron/a/abe/abeli/abelia__gb_1_8.mp3",
		"http://www.yourdictionary.com/audio/a/ab/abelia.mp3",
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0016400.mp3"
	],
	"abelmoschus": [
		"http://img2.tfd.com/pron/mp3/en/US/sh/shdjdgdyslsjsfsodrsksns3h7h3.mp3"
	],
	"abelmosk": [
		"http://img2.tfd.com/pron/mp3/en/UK/dr/drdjdgdyslsjsfsoshgk.mp3",
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0016700.mp3",
		"http://s3.amazonaws.com/audio.vocabulary.com/1.0/us/A/G9XTJLHSNJWL.mp3"
	],
	"abenaki": [
		"http://img2.tfd.com/pron/mp3/en/US/dt/dtdjdgdysjddskslhn.mp3",
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0016800.mp3",
		"http://www.yourdictionary.com/audio/a/ab/abenaki.mp3"
	],
	"aberdare": [
		"http://img2.tfd.com/pron/mp3/en/UK/df/dfdjdgdysddtdsstd7gk.mp3",
		"http://img2.tfd.com/pron/mp3/en/US/df/dfdjdgdysddtdsstd7gk.mp3",
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0017100.mp3"
	],
	"aberdeen": [
		"http://www.yourdictionary.com/audio/a/ab/aberdeen.mp3",
		"http://static.sfdict.com/staticrep/dictaudio/A00/A0017200.mp3"
	]

Apparently, each key is an English word and the value is either the URL, or a list of URLs, to the MP3 audio files.

The data.json and ultimate.json are 11.1 MB and 39.1 MB respectively, so you can load any of them into the memory and let it serve as a look-up table.

Acknowledgements

The list of words is downloaded from a third-party distributor of WordNet called Words API Blog.

My special thanks to these online dictionary owners for making their websites crawlable. Some of them apparently devoted quite some effort hiding out the MP3 URls from the main HTML files though.

More Repositories

1

Java-Console-Table-Builder

An extendable library to build stylish Excel-like tables, which can be converted into a single string with all formats preserved.
Java
48
star
2

Java-Console-View

A Java framework to instantly build the View layer of your command line app. No more worries about anything like printing menus or validating user inputs. Just focus on your app logic.
Java
38
star
3

Database-Normalization-Solver

A Java library to handle attributes and functional dependencies, and to solve database normalization related problems, including closure, minimal basis, projection, and decomposition to BCNF and 3NF, etc.
Java
30
star
4

Java-Console-Tree-Builder

A lightweight library to convert a tree into formatted string.
Java
16
star
5

pdf-server

A PDF management server with RESTful APIs to boost collaboration among natural language processing (NLP) research teams
Python
9
star
6

pdf-client

A python client library to give you a more pleasant experience with [pdf-server](https://github.com/nathanielove/pdf-server)
Python
5
star
7

Duplicate-File-Finder

A Java app with GUI to find all the duplicate files in a given directory and all its sub-directories, using the MD5 hash function provided in Google Guava Library.
Java
5
star
8

Cryptography-Solver-for-Discrete-Math

An extensible API to perform basic encryption/decryption introduecd in Discrete Math, including Affine, Caesar, Vigenere, One Time Pad, RSA, etc.
Java
5
star
9

hytrast-sublime

Hytrast: A High-contrast Color Scheme for Sublime Text 3
4
star
10

Version-Control-Framework-for-Distributed-Transcript-Editing

Version Control Framework for Distributed Transcript Editing
Python
1
star