Skip to content

Instantly share code, notes, and snippets.

View wav-to-tlog.py
# VAD wrapper is taken from PyTorch Speaker Verification:
# https://github.com/HarryVolek/PyTorch_Speaker_Verification
# Copyright (c) 2019, HarryVolek
# License: BSD-3-Clause
# based on https://github.com/wiseman/py-webrtcvad/blob/master/example.py
# Copyright (c) 2016 John Wiseman
# License: MIT
# Additions Copyright (c) 2021, Jim O'Regan
# License: MIT
import collections
View README.txt
Based on
https://www.dyslexia-reading-well.com/44-phonemes-in-english.html
adapted for US English, and with additions
Lexicon based on wiktionary (but normalised)
@jimregan
jimregan / README.txt
Last active Oct 25, 2020
Middle Irish for festus
View README.txt
Lexicon is based on the one from https://github.com/kylebgorman/wikipron
wikipron has all IPA symbols split; I've rejoined (what I assume are) diphthongs
Alignables file was made based on the lexicon; there are undoubtedly missing alignables
Needs festus (part of https://github.com/google/language-resources/)
@jimregan
jimregan / README.txt
Last active Oct 23, 2020
Manx pieces
View README.txt
https://en.wikipedia.org/wiki/Manx_language
View linked-list-print-middle.c
/* print middle element of list; second if even */
/* http://practice.geeksforgeeks.org/problems/finding-middle-element-in-a-linked-list/1 */
/* tl;dr - two pointers, one incrementing by two */
#include <stdio.h>
#include <stdlib.h>
struct Node {
int data;
struct Node* next;
View ffs.java
private static String dropSpaces(String s) {
String out = "";
for(char c : s.toCharArray()) {
if(c != ' ') {
out += c;
}
}
return out;
}
public static String stringDropsString(String haystack, String needle) {
View cheap-eid.pl
#!/usr/bin/perl
# Copyright (c) 2015-2016 Trinity College, Dublin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
View longest_suffix.pl
#!/usr/bin/perl
my @in = qw(asfalt asfaltu asfalcie);
sub longest_suffix {
my $list = shift;
my $first = shift(@{$list});
for my $second(@in) {
my @a = split(//, $first);
View phon-collisions.pl
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
open(IN, "<", "$ARGV[0]");
binmode(IN, ":encoding(latin-1)");
#open(OUT, ">", "collisions.txt");
#binmode(OUT, ":utf8");
View pronfixfg.pl
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
binmode(STDIN, ":utf8");
my %tweak = (
'áit éigin' => '',