Skip to content

Instantly share code, notes, and snippets.

@ca4ti
ca4ti / tts.sh
Created February 16, 2024 09:18 — forked from jerryOkafor/tts.sh
Quick and dirty IVR sounds for your Asterisk PBX
#!/bin/bash
#title : tts.sh
#description : This script will convert text to speech using Google translate API
# and then to Asterisk formats (wav, sln, gsm)
#
#author : Andrius Kairiukstis <[email protected]>
#date : 26 July 2013
#version : 0.1
#usage : bash tts.sh FILENAME VOICE PHRASE
@ca4ti
ca4ti / Sintetização e reconhecimento de voz em português.py
Created February 9, 2024 11:59 — forked from RonanUFPa/Sintetização e reconhecimento de voz em português.py
Script em Python para sintetização e reconhecimento de voz em português
'''
BAIXE TODOS OS ARQUIVOS NECESSÁRIOS AQUI: "https://drive.google.com/drive/folders/1FjKBlwf4PAZjI4K76uPzQ4e1d8EgQZww?usp=sharing", inclui todos os arquivos mencionados abaixo.
--------------------------------------------------------------------------------------------------------------------------
Antes de começarmos, vamos precisar instalar algumas bibliotecas, caso você utilize linux você nao terá erros. Contudo, se você utiliza windows, tem uma seção de soluções de erros.
--------------------------------------------------------------------------------------------------------------------------
pip install SpeechRecognition pyaudio
--------------------------------------------------------------------------------------------------------------------------
pip install pocketsphinx
--------------------------------------------------------------------------------------------------------------------------
Em caso de erros (Windows):
@ca4ti
ca4ti / echo.py
Created February 9, 2024 11:16 — forked from cenpect/echo.py
Mesclando reconhecimento de voz e TTS
from vosk import Model, KaldiRecognizer
import json
import pyttsx3
import pyaudio
import os
# Verificando modelo pre-treinado
if not os.path.exists("model-br"):
print ("Favor verificar existencia do modelo treinado em model-br.")
exit (1)
@ca4ti
ca4ti / gist:3b89945b51efe08942ef98643e0c74ef
Created November 2, 2023 08:30 — forked from ederwander/gist:1944257
Python Smith Trigger for frequency analysis
#ederwander
#date 10/02/2012
from __future__ import division
import math
import wave
import numpy as np
freq = 0.;
trigfact = 0.6;
@ca4ti
ca4ti / 1st_wr703n-image-create.sh
Created October 14, 2023 14:32 — forked from probonopd/1st_wr703n-image-create.sh
Working way to create a simple Ethernet/WLAN web radio player using a cheap tiny WR703N router and a cheap USB C-Media soundcard. Switch radio stations with the reset switch. -- THE ACTUAL CODE ON THIS PAGE IS ***OUTDATED***, use https://github.com/probonopd/minikrebs instead!
# http://www.aliexpress.com/item/New-Mini-Portable-Wireless-3G-Router-TP-LINK-TL-WR703N-150M-150Mbps-WR703N-Pocket-size-Wifi/948558329.html
# Someone should convince TP-Link to build this with more Flash, serial headers, bare board, *duino style...
# This is the starting point for a webradio appliance in the works
# TODO: Preconfigure everything, hook up Arduino for IR control sending and receiving
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
tar xfj OpenWrt-ImageBuilder*
cd "$HOME/Downloads/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486"
@ca4ti
ca4ti / openwrt-qemu.md
Created October 12, 2023 10:46 — forked from extremecoders-re/openwrt-qemu.md
Running OpenWRT ARM under QEMU

Environment

The steps shown below are done on a Ubuntu VM using Qemu 3.0

$ qemu-system-arm -version
QEMU emulator version 3.0.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

To quit Qemu at any time press Ctrl+a x, i.e. Ctrl+a and then x

Requirements:
Winbond W25Q128FV (or other compatible chip, see pepe2k's uboot readme)
SPI Programmer (ie a Revelprog IS)
Serial Console (ie a CP2102)
HEX editor (ie Bless)
32bit vm to compile pepe2k's uboot
tftp server
Note: I already had pepe2k's uboot + LEDE r930 flashed on the original 4MiB flash chip. I assume I made a mistake with the data partition due to already having pepe2k's uboot installed. More is explained later on.
@ca4ti
ca4ti / unbrick-debrick-tp-link-3020-in-osx.md
Created September 29, 2023 14:55 — forked from ziguane/unbrick-debrick-tp-link-3020-in-osx.md
Unbrick|Debrick TP-LINK 3020 in OS X (includes fun things like breaking warranty)
@ca4ti
ca4ti / freeradius-setup.md
Created September 29, 2023 09:32
FreeRADIUS Setup

FreeRADIUS Setup

Install FreeRADIUS:

apt-get install freeradius freeradius-mysql freeradius-utils

Allow all NAS clients to connect to it:

@ca4ti
ca4ti / coova-chilli-commands.md
Created September 29, 2023 09:32
Coova Chilli Commands

Coova Chilli Commands

Installation

Recommended OpenWRT firmware version: OpenWRT 19. Newer versions do not have iptables installed by default so Coova Chilli will not work out of the box

opkg update
opkg install coova-chilli nano