This repository houses highlights from the acoustic engineering tools present within this personal github account. Highlights from other repository heads are not displayed here.
Author: Mikael Asfaw
Created: Feb 18, 2025
Updated: Feb 10, 2026
- Loudspeaker LPM Simulation Tool
- Loudspeaker Magnetics Simulation Tool
- Speech Mean Opinion Score Using PESQ MOS
- Memory Manipulation on MSP423 ARM CORTEX-M4 MCU
- Speech Transcription and Word Error Rate Calculation
- MATLAB GUI Application for Testing Microphones and Loudspeakers
- Machine Learning Models to Classify Music Genre
Note
A browser accessible loudspeaker linear parameter design application. The files in this repository are written to specify a loudspeaker from it's linear parameters.
Details
Loudspeaker LPM Simulation Tool
* Python 3.12.3
* flask
* numpy
* waitress
* python-dotenv
* bokeh
* loudspeaker
* loudspeakerBokehPlotter
To install, run this command in bash
git clone https://github.com/mikaellum/loudspeaker-app-py.gitFor getting the sever up
python3 server.pyOn a browser
The output html app looks similar to:
Note
The files in this repository are written to run determine the electromotive properties of a loudspeaker using FEMM and the mechanical dimensions of the loudspeaker motor.
Details
Loudspeaker Magnetics Simulation Tool
* Python 3.12.2
* pyfemm
* numpy
* math
The files in this repository are written to help design a loudspeaker motor systems.
To install, run this command in bash
git clone https://github.com/mikaellum/loudspeaker-magnetics-pyFEMM.gitFor getting voice coil properties
python3 VoiceCoil.py Rdc NumLayers WireDiameter IACS BobbinDiameter SpecGravity insThickUsing the output from the voice coil properties, can calculate the motor properties
python3 Motor.py Ag Ph Pr Pcr Pbh Pbr Wh Vch Vcw Vco Mh Mw Bm Nturns WireGuage SoftSteel Magnet R M_domain M_motor M_vc times_x times_y Xmax Noutput for voice coil similar to:
Design Width: 0.22[mm]
Design Height: 6.02[mm]
Number of Turns of the Voice Coil: 83
Mass of the Voice Coil: 0.41[g]
output for the motor similar to:
Rdc of the voice coil is: 5.14[Ohm]
BL of the motor is: 2.18[T*m]
Mass of the Motor is: 112.61[g]
Total Volume of the Motor is: 16.29[cc]
the output plots flux density heat-map are similar to:
the output plots for the non-linear BL are similar to:
Note
Python code to determine PESQ-MOS of a degraded audio file to an original for both wideband and narrowband applications
Details
Speech Mean Opinion Score Using PESQ MOS
* Python 3.12.2
* pesq
* scipy
* matplotlib
The files in this repository are written to help get the PESQ MOS scores for speech (telephony standard).
To install, run this command in bash
git clone https://github.com/mikaellum/PESQ-MOS-py.git
For getting the MOS score values
python3 mosScore.py original degradedTo visualize the spectrogram of the .wav files
python3 plotSpecgram.py file nfft noverlap cmap figWidth figHeightoutput for the MOS scores is similar to:
The narrow band MOS is: 4.38
The wide band MOS is: 4.33
the output specgram for the orignal speech file is similar to:
the output specgram for the degraded speech file is similar to:
Note
The code is intended to manipulate registers and memory addresses on a TI MSP423 ARM CORTEX-M4 Evaluation Kit.
Details
Memory Manipulation on MSP423 ARM CORTEX-M4 MCU
* gcc 11.4.0
* gcc-arm-none-eabi
* make
To install, run this command in bash
git clone https://github.com/mikaellum/Embedded-Systems-Coursera.gitcd course1/
makeNote
The files in this repository are written to help compare speech to text algorithms.
Details
Speech Transcription and Word Error Rate Calculation
* Python 3.12.2
* numpy
* whisper
* SpeechRecognition
* Sphinx
To install, run this command in bash
git clone https://github.com/mikaellum/STT-TTS-WER-py.gitExample command for using sphinx model
python3 recognize.py originalSpeech.wav sphinx HL1reference.txtExample command for using whisper model
python3 recognize.py originalSpeech.wav whisper HL1reference.txttranscription of the reference the .wav file is similar to:
Harvard List Number One. The birch canoe slid on the smooth planks. Glue the sheet to the dark blue background. It's easy to tell the depth of a well.These days a chicken leg is a rare dish. Rice is often served in round bowls. The juice of lemons makes fine punch. The box was thrown beside the parked truck. The hogs were fed chopped corn and garbage. Four hours of steady work faced us. A large size in stockings is hard to sell.
sphinx transcription of the .wav file is similar to:
competence number won the bet you they say the list may thanks this she did the dog of the background is she he'd tell the depth of the well of the stays at chicken leg is a bad day she writes is often said to round balls that she said lemons make a fine conch the boxes friend beside the puppets talk the hopeless fed chopped colon and garbage full houses steady well at fakes does not slices stockings is hard to sell
Word Error Rate of sphinx is: 75.904 [%]
whisper transcription of the .wav file is similar to:
Harvard List Number One, the Birch canoes slid on the smooth planks. Do the sheet to the dark blue background. It's easy to tell the depth of a well. These days a chicken leg is a rare dish. Rice is often served in round bowls. The juice of lemons makes fine punch. The box was thrown beside the parked truck. The hoax were fed chopped corn and garbage. Four hours of steady work faced us. Large size and stockings is hard to sell.
Word Error Rate of whisper is: 0.000 [%]
Important
Requires MATLAB 2024b
Details
MATLAB GUI Application for Testing Microphones and Loudspeakers
The files in this repository are written to in MATLAB to create a GUI Application for audio testing of Speakers and Microphones
The GUI for sweep tests looks similar to:
The GUI for play and record tests looks similar to:
Note
The Machine learning model design here is intended to listen to short audio snippets and classify the music genre of the audio file
Details
Machine Learning Model to Classify Music Genre based on short Audio Clips
* Python 3.12.2
* numpy
* pandas
* pickle
* sklean
* tensorflow
* librosa
The tensor-flow neural network architecture looks like this:
The model was trained for 100 Epochs with an accuracy of 0.96 and a loss of 0.194
The tensor-flow neural network confusion matrix looks like this:
The SVM confusion matrix looks like this:
All the designed models settled around a F1 Score between 0.41 - 0.47, this was due to feature distortion introduced by mashing together truly uncorrelated genre
The model architecture is sound, would perform better with cleaner datasets. The final paper can be found here









