This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.widget import Widget | |
from kivy.properties import NumericProperty, ListProperty | |
from math import sin, cos, pi | |
kv = ''' | |
BoxLayout: | |
FloatLayout: | |
RoundedBox: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
sys.platform = 'linux2' | |
import os.path | |
import mimetypes | |
import urlparse | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
from kivy.app import App | |
from kivy.uix.image import Image | |
from kivy.clock import Clock | |
from kivy.graphics.texture import Texture | |
import cv2 | |
class KivyCamera(Image): | |
def __init__(self, capture, fps, **kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydub import AudioSegment as As | |
import os | |
def change(p_af, p_maf, duer, fr= None) : | |
"""$p_af is path of input audio file | |
$p_maf is path for output audio file | |
$duer = output audio file duration (in seconds) | |
$fr = output audio file frame rate""" | |
with open(p_af, 'rb') as af : | |
sound = As.from_file(af) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gtts import gTTS | |
from io import BytesIO | |
import pygame; pygame.mixer.init() | |
def say(text): | |
tts = gTTS(text=text, lang='en') | |
fp = BytesIO() | |
tts.write_to_fp(fp) | |
fp.seek(0) | |
pygame.mixer.music.load(fp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import librosa | |
#For specgram | |
NFFT = 1024 | |
noverlap = 900 | |
#For MFCC | |
n_mfcc = 40 |