Skip to content

Instantly share code, notes, and snippets.

View dkashkin's full-sized avatar

Dennis Kashkin dkashkin

View GitHub Profile
@padoremu
padoremu / playground.py
Created January 23, 2020 14:33
Tensorflow and Tensorflow Lite code in the context of audio processing (MFCC, RNN)
# This file contains a collection of workarounds for missing TFLite support from:
# https://github.com/tensorflow/magenta/tree/master/magenta/music
# as posted in https://github.com/tensorflow/tensorflow/issues/27303
# Thanks a lot to github.com/rryan for his support!
# The function for testing MFCC computation given PCM input is:
# - test_mfcc_tflite
# Please not that the output has not yet been compared to the one produced by the respective TF functions.
# This file also contains test code for other problems in the context of audio processing with TF and TFLite:
@kmark
kmark / AudioRecordActivity.java
Last active January 4, 2024 11:01
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* Copyright 2016 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@sma
sma / README.md
Last active July 4, 2023 06:28
This is an ad-hoc Java-to-Dart translator written in three days. This is version 2 which some bug fixes.

Java to Dart

This is an ad-hoc Java-to-Dart translator originally written on two (admittedly long) evenings.

See http://sma.github.io/stuff/java2dartweb/java2dartweb.html for a demo.

Note: It doesn't support the complete Java grammar specification and cannot translate everything. It only translates syntax and does not attempt to translate Java library classes and methods to Dart equivalents (with the exception of String.charAt and StringBuffer.append). You will have to make changes to the resulting Dart code. It does not support anonymous inner classes.

However, I was able to successfully convert a 7000+ line command line application with only minimal fixes in 30 minutes.