Skip to content

yas-sim/csm_voice_encode_synthesis_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSM voice encode / synthesis experimental code

CSM stands for composite sinusoidal modeling, an algorithm for the speech synthesizer.
Some of the YAMAHA FM sound devices support this feature, and several game used this feature to speak in the game application.

program description
csm_encoding.ipynb Audio to CSM data converter.
Reads an audio file and generates a CSM data file.
csm_synthesis.ipynb CSM synthesizer.
Reads a CSM data file and synthesis an audio file from the CSM data
csm_synthesis_rt.py Real-time CSM synthesizer.
Perform real-time CSM voice synthesis. You can change the key (frequency) of the playback sound with keyboard. This feature is something like a vocoder. This program repeatedly playback the sound until you press 'q' key.

csm_synthesis_rt.py run example

>python csm_synthesis_rt.py
21.82 sec
max amplitude: 123.0367660522461
Real-time CSM audio synthesis.
Keyboard layout - You can change the key of the playing back sound.
| s d   g h j   |
|z x c v b n m ,|
Press 'q' to quit.

Audio samples:

apollo11-original

apollo11-csm

Memo:

Convert audio data into mono/32Kbps wav format data.

ffmpeg\bin\ffmpeg.exe -i input.wav -ar 32000 -ac 1 -f wav "output.wav"