Skip to content

Instantly share code, notes, and snippets.

View jalcine's full-sized avatar
💭
Decentralize and democratize the Web.

Jacky Alciné jalcine

💭
Decentralize and democratize the Web.
View GitHub Profile
#!/bin/bash
# FLAC encoded example
curl \
--data-binary @example.flac \
--header 'Content-type: audio/x-flac; rate=16000' \
'https://www.google.com/speech-api/v1/recognize?xjerr=1&client=chromium&pfilter=2&lang=en-US&maxresults=6'
# Speex encoded example
curl \
@jalcine
jalcine / gist:4243726
Created December 9, 2012 07:15 — forked from fennb/gist:1139053
Sample speech recognition output
{
"hypotheses": [
{
"confidence": 0.88569070000000005,
"utterance": "this is pretty cool"
},
{
"utterance": "thesis pretty cool"
},
{

#Council of Chiefs

9:00PM November 3, 2012

Camp Lazarus
4422 Columbus Pike
Delaware, OH 43015

Goal of the Meeting: To make decisions regarding the specifics of Conclave 2013

@jalcine
jalcine / livedemo.gtk.py
Created January 7, 2013 12:22
Automatic speech recognition with PocketSphinx and GStreamer.
#!/usr/bin/env python
# Copyright (c) 2008 Carnegie Mellon University.
#
# You may modify and redistribute this file under the same terms as
# the CMU Sphinx system. See
# http://cmusphinx.sourceforge.net/html/LICENSE for more information.
import pygtk
pygtk.require('2.0')
@jalcine
jalcine / bitly.rb
Last active December 11, 2015 05:48
An Octopress / Jekyll plugin to provide a tag that automatically generates a bit.ly short-link for the current page in reference.
##
## @author Jacky Alcine <me@jalcine.me>
## @see [TODO: Add URL to post about bit.ly URLs.]
##
## Add in Bit.ly URL support to pages.
require "bitly"
# Ensure use of new API.
Bitly.use_api_version_3
# A Liquid tag for Jekyll sites that allows posting links to Debian BTS.
# by: Andrew Shadura
#
# Example usage: {% bts 123456 %} //adds a link to a bug #123456
#
# Or, you can just use debian/changelog format, like closes: #123456
# Launchpad bugs are also supported.
require 'cgi'
require './plugins/post_filters'
@jalcine
jalcine / post-receive
Last active December 11, 2015 14:59
Quick copying and deployment of static files for Git.
#!/usr/bin/env bash
## @author Jacky Alcine <me@jalcine.me>
## @description post-recieve hook to copy ("deploy") files.
##
## @note This only checks the first ref pushed up; it doesn't iterate.
## Variables to be used.
LIVE_PATH="<your path here>"
LIVE_BRANCH="production"
@jalcine
jalcine / ktpbuildsrc
Created January 30, 2013 07:15
Build script for KDE Telepathy project.
#!/bin/bash
#
# Build script for telepathy-kde, assumes you have the latest telepathy-qt4,
# have a proper gitconfig setup with the "kde:" prefix.
#
# Instructions on how to use the script :
# -b build only (updates repos before build)
# -bi build and install (updates repos before build)
# -u update/clone repos
# -h show help menu
@jalcine
jalcine / recognize_from_mic.c
Last active December 14, 2015 01:38
Snippet from pocketsphinx/src/programs/continuous.c that handles continuous recognition from microphone (be it from Pulse, ALSA, or Jack).
/*
* Main utterance processing loop:
* for (;;) {
* wait for start of next utterance;
* decode utterance until silence of at least 1 sec observed;
* print utterance result;
* }
*/
static void
recognize_from_microphone()
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <weppos@weppos.net>
# Copyright:: 2007-2010 The Authors