Skip to content

Instantly share code, notes, and snippets.

@nicolaspanel
nicolaspanel / nodejs-example.js
Last active Jul 6, 2022
Getting started with Deeptranscript WebSocket streaming API
View nodejs-example.js
const querystring = require('querystring');
const ws = require("ws");
const qs = querystring.stringify({{
language: 'fr',
sampleRate: sampleRate, // WARN: must match recording configuration
format: 's16le', // WARN: must match recording configuration
// expectedPhrases: ['can be a word or a short sentence'],
}})
const socket = new ws.WebSocket(`wss://:${{process.env.API_TOKEN}}@stream.deeptranscript.com/?${{qs}}`);
socket.on('open', () => {{
View post_review.py
import requests
API_TOKEN = "<YOUR-API-TOKEN>" # see https://www.callity.fr/configuration/integrations
resp =requests.post(
url="https://www.callity.fr/api/speech_source_reviews/",
headers={
'Authorization': f'Bearer {API_TOKEN}',
},
json=dict(
language="fr", # or "en"
recording='<SOME-URL>',
@nicolaspanel
nicolaspanel / README.md
Created Aug 24, 2016
basic microphone for nodejs (linux)
View README.md

Requirements

  • arecord: sudo apt-get install alsa-utils
  • lodash: npm install lodash

Usage

const Microphone =  require('./path/to/microphone');
const mic = new Microphone();
mic.pipe(someWritable);
setTimeout(() =&gt; mic.stop(), 5000);
@nicolaspanel
nicolaspanel / App.config
Last active Dec 21, 2015
SpecFlow Tests configuration for VS 2012 Express
View App.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<!-- use unit test provider SpecRun+NUnit or SpecRun+MsTest for being able to execute the tests with SpecRun and another provider -->
<unitTestProvider name="NUnit" />
</specFlow>
@nicolaspanel
nicolaspanel / App.config
Created Aug 14, 2013
App.config SpecFlow configuration for VS 2012 Express
View App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow"/>
</configSections>
<specFlow>
<unitTestProvider name="NUnit" />
<language feature="en-US"/>