forked from hgneng/ekho
-
Notifications
You must be signed in to change notification settings - Fork 0
Audio Data Format
Cameron Wong edited this page May 16, 2016
·
2 revisions
PCM is raw format of audio data. It can pass to sound card and play directly. CD quality's sample rate is 44100Hz and 16bit for each sample.
WAV is PCM data with 44 bytes header which describes sample rate, channels, bits per sample information.
MP3 compresses PCM data in smaller size and good quality (but will lose some quality) for music. MP3 encoder may has license issue.
OGG is an free alternative format to MP3.
GSM compresses PCM data in even sammler size than MP3 but it only suitable for bandwidth human voice. I am not sure whether this GSM is the same to GSM in 2G mobile phone of telecommunication.
Voice data files locates in directory ekho-data of Ekho's source code:
- pinyin/ stores audio files of format WAV, MP3, OGG or GSM. Files are named by their corresponding pinyin.
- pinyin.voice is package of pinyin directory which will accelerate the loading speed especially on Android device. It's much slower to load thousands of small files than one big files.
- pinyin.index maps the position of each file in pinyin/ to that in pinyin.voice
- zh.dict stores Mandarin dictionary which maps character/word to pinyin.