McGarrah Technical Blog

Posts in category "development"

ASR with PyTorch

ASR with PyTorch: Exploring Phoneme Representations

I have a fascination with the sounds of languages (phonemes) and how they are processed. This came about from a project I did a few years ago in grad school. How ASR (automatic speech recognition) used to work did not include breaking down the sounds of the language and present them as pieces of the solution. You typically just got a final text representation.

I’m interested in seeing if the phonetic or phoneme representations can be pulled from the modern machine learning ASR pipelines. This is just an interest of mine with no defined goals beyond learning.

Introducing oneworldsync: A Python Module for 1WorldSync Content1 API Access

Introducing oneworldsync

A Python Module for 1WorldSync Content1 API Access

I’m pleased to introduce a Python module I’ve developed from scratch called oneworldsync. For those who need to programmatically access product content data from the 1WorldSync Content1 API, finding a streamlined solution was challenging to say the least. The only path provided was a very simple Python example, some older PDF documentation and a reference Java SDK. I work primarily in the Machine Learning space so Python first was a priority. Those were my primary motivations behind creating oneworldsync as I stumbled towards building a library.

Sharing file systems between WSLv2 instances

I have a significant investment in my WSLv2 Ubuntu 22.04.3 LTS installation. It has my Nvidia GPU setup nicely integrated and several machine learning demos and tests I’ve built and use for keeping current on machine learning. With Ubuntu 24.04 LTS released, I now want to play around in the newer version but don’t want to move or worse copy my entire set of models and repositories across. I have well over 500Gb of content and absolutely don’t want two copies of those floating around. I’m looking for a solution to this and figure others have encountered it.

Explorer WSL Filesystems

Python TimeDate functions

I needed a quick understanding of the Python 3.3.0 datetime functionality to do a difference in times across days. Python make it amazingly easy.

import datetime
from datetime import timedelta

# get current timedate
now = datetime.datetime.now()
print "now: " + str(now)
# get one day of time oneday = timedelta(days=1)
# make one day in the future and past
tomorrow = now + oneday
yesterday = now - oneday
print "tomorrow: " + str(tomorrow)
print "yesterday: " + str(yesterday)
# compare times
if now < tomorrow:
  print "now < tomorrow"
elif now > tomorrow:
  print "now > tomorrow"
else:
  print "now must be equal tomorrow"
if now > yesterday:
 print "now > yesterday"
elif now < yesterday:
 print "now < yesterday"
else:
 print "now = yesterday"

The expected results are:

CMD> python time.py
now: 2015-03-19 14:30:31.083000
tomorrow: 2015-03-20 14:30:31.083000
yesterday: 2015-03-18 14:30:31.083000
now < tomorrow
now > yesterday

I hope this helps someone.