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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SimpleLoopback : MonoBehaviour { | |
public string[] DeviceNames = new string[2]; | |
public int prepareBufferSize = 1024; | |
AudioSource source; | |
AudioClip[] microphoneClips = new AudioClip[2]; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System; | |
[RequireComponent(typeof(AudioSource))] | |
public class LoopbackMicrophone : MonoBehaviour { | |
public int prepareBufferSize = 1024; | |
AudioClip clip; |
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
using System; | |
using UnityEngine; | |
// 1. WAVWriter: https://github.com/TyounanMOTI/WAVWriter | |
// Releasesから.unitypackageをダウンロードしてインポートしてください | |
// 2. 空のGameObjectにアタッチして開始すると、プロジェクトのルートフォルダに record.wav を書き出します。 | |
// 録音するマイクは、Windowsであれば既定のマイクです。 | |
public class MicrophoneRecorder : MonoBehaviour { | |
AudioClip clip; | |
int head = 0; |
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
import tensorflow as tf | |
import argparse | |
import sys | |
from collections import deque | |
import pyaudio | |
# pylint: disable=unused-import | |
from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio | |
# pylint: enable=unused-import |
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
using UnityEngine; | |
public class ProjectionMatrixSetter : MonoBehaviour { | |
Camera main; | |
[SerializeField] | |
float nearClip = 0.01f; | |
[SerializeField] | |
float farClip = 500.0f; |