WebRTCでやれよ!と言われそうなところですが、 WebSocket+WebAudioの組み合わせで音声ストリーミングをシンプルに構成する方法を紹介してみます。
サーバーサイドは何でも良いのですが、
とりあえずNode.jsでtest.mp3
というサンプルファイルをpcmモジュールでデコードし、
wsでクライアントに垂れ流す作りにしておきます。
// slackのwebhook URL | |
var postUrl = "https://hooks.slack.com/services/xxxxxxxxxxx"; | |
// 通知したいslackのチャネル(部屋) | |
var postChannel = "#n_app_review"; | |
// 抽出元のGmailのラベル | |
var checkLabel = "TO_ME"; | |
function myFunction() { |
#!/usr/bin/env python | |
""" | |
The script builds OpenCV.framework for iOS. | |
The built framework is universal, it can be used to build app and run it on either iOS simulator or real device. | |
Usage: | |
./build_framework.py <outputdir> | |
By cmake conventions (and especially if you work with OpenCV repository), | |
the output dir should not be a subdirectory of OpenCV source tree. |
Agnes en_US # Isn't it nice to have a computer that will talk to you? | |
Albert en_US # I have a frog in my throat. No, I mean a real frog! | |
Alex en_US # Most people recognize me by my voice. | |
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana. | |
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst. | |
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne. | |
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme. | |
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train. | |
Bahh en_US # Do not pull the wool over my eyes. | |
Bells en_US # Time flies when you are having fun. |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
using UnityEngine; | |
using System.Collections; | |
public class ScreenRecorder : MonoBehaviour | |
{ | |
public int framerate = 30; | |
public int superSize; | |
public bool autoRecord; | |
int frameCount; |
ofVec3f cartesianToSpherical(const ofVec3f &v) | |
{ | |
float r = v.length(); | |
float s = acos(v.z / r); | |
float f = atan2(v.y, v.x); | |
return ofVec3f(r, s, f); | |
} | |
ofVec3f sphericalToCartesian(const ofVec3f &v) | |
{ |
i | |
me | |
my | |
myself | |
we | |
our | |
ours | |
ourselves | |
you | |
your |