Skip to content

Instantly share code, notes, and snippets.

"""
Example of how to synthesize speech using the Coqui Studio API.
Streams the download/playback of the audio.
Usage:
$ COQUI_API_TOKEN="put your API token here" python coqui_api_stream.py --text "Hi there!"
To specify the voice to use, pass eg: `--voice 98d4af7d-aca0-4a70-a26e-4ca59023a248`
@reuben
reuben / create_voice.py
Last active April 1, 2023 18:09
Script to create a custom voice in the Coqui API
import sys
import requests
import argparse
import json
import os
from requests_toolbelt.multipart.encoder import MultipartEncoder
try:
API_TOKEN = os.environ["COQUI_API_TOKEN"]
#include <FastLED.h>
#define LED_PIN 13
#define NUM_LEDS 54
#define BRIGHTNESS 64
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define UPDATES_PER_SECOND 100
Client ID project/deepspeech/worker/macos-heavy-b-1 does not have sufficient scopes and is missing the following scopes:
```
auth:websocktunnel-token:taskcluster-net/proj-deepspeech.ds-macos-heavy-b-1.60099
```
This request requires the client to satisfy the following scope expression:
```
auth:websocktunnel-token:taskcluster-net/proj-deepspeech.ds-macos-heavy-b-1.60099
Client ID project/deepspeech/worker/macos-heavy-b-1 does not have sufficient scopes and is missing the following scopes:
```
auth:websocktunnel-token:taskcluster-net/proj-deepspeech.ds-macos-heavy-b-1.60099
```
This request requires the client to satisfy the following scope expression:
```
auth:websocktunnel-token:taskcluster-net/proj-deepspeech.ds-macos-heavy-b-1.60099
@reuben
reuben / amvrun
Last active October 27, 2018 14:21
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import argparse
import itertools
import tempfile
import os
import shlex
import shutil
import argparse
import deepspeech as ds
import numpy as np
import shlex
import subprocess
import sys
parser = argparse.ArgumentParser(description='DeepSpeech speech-to-text from microphone')
parser.add_argument('--model', required=True,
help='Path to the model (protocol buffer binary file)')
diff --git a/src/jobs.js b/src/jobs.js
index 6ea979e..fbbed59 100644
--- a/src/jobs.js
+++ b/src/jobs.js
@@ -554,7 +554,11 @@ exports.initApp = function(app) {
if (groupsModule.canAccessJob(req.user, dbjob)) {
let jobdir = _getJobDir(dbjob)
res.status(200).type('tar.gz')
- tar.pack(jobdir).pipe(zlib.createGzip()).pipe(res)
+ tar.pack(jobdir, {
@reuben
reuben / keybase.md
Created February 2, 2017 21:32
keybase.md

Keybase proof

I hereby claim:

  • I am reuben on github.
  • I am reuben_ (https://keybase.io/reuben_) on keybase.
  • I have a public key whose fingerprint is B19B 574B E186 B1BF CD23 9A86 B21F EB8E D85D 838C

To claim this, I am signing this object:

def model(batch_x, seq_length, dropout):
def clipped_relu(x):
return tf.minimum(tf.nn.relu(x), relu_clip)
with slim.arg_scope([slim.variable], device="/cpu:0"):
with slim.arg_scope([slim.fully_connected], activation_fn=clipped_relu):
with slim.arg_scope([slim.dropout], keep_prob=(1.0 - dropout)):
fc_1 = slim.dropout(slim.fully_connected(batch_x, n_hidden_1))
fc_2 = slim.dropout(slim.fully_connected(fc_1, n_hidden_2))
fc_3 = slim.dropout(slim.fully_connected(fc_2, n_hidden_3))