Skip to content

Instantly share code, notes, and snippets.

View emacs-settings_2024_ubuntu.el
;; 起動時間をメッセージバッファに表示
(add-hook 'after-init-hook
(lambda ()
(message "init time: %.3f sec"
(float-time (time-subtract after-init-time before-init-time)))))
;; ロードパスの設定
(add-to-list 'load-path "~/.emacs.d/lisp/")
;; C-zを無効化
View emacs-settings_2024.el
;; C-zを無効化
(global-unset-key "\C-z")
;; ロードパスを追加
(add-to-list 'load-path "~/.emacs.d/lisp/")
;; theme
(if (display-graphic-p)
(load-theme 'solarized-light t))
;; (load-theme 'solarized-light t)
@tam17aki
tam17aki / gla.py
Last active December 27, 2023 07:15
Estimation of phase spectrum based on the Griffin-Lim algorithm.
View gla.py
"""Griffin-Lim algorithm.
Copyright (C) 2023 by Akira Tamamori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tam17aki
tam17aki / YaGLU.py
Last active December 25, 2023 07:17
View YaGLU.py
# -*- coding: utf-8 -*-
"""A wrapper for PyTorch GLU (Gate Linear Unit).
Copyright (C) 2023 by Akira Tamamori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
View power_fo_monitor.py
# -*- coding: utf-8 -*-
"""音声パワーと基本周波数をリアルタイムモニタリングする.
Copyright (C) 2023 by Akira TAMAMORI
Copyright (C) 2022 by Koji INOUE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
View detect_melody_demo.py
# メロディ推定のデモンストレーション
# brew install timidity
# brew install libsndfile
# pip install tensorflow
# pip install tensorflow_hub
# pip install music21
# pip install pydub
import math
View whisper_mic_cpu.py
# Copyright (c) 2023 Blake Mallory
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
View voicevox_demo.py
from pathlib import Path
from voicevox_core import AccelerationMode, VoicevoxCore
import sounddevice as sd
import soundfile as sf
SPEAKER_ID = 2 # 話者IDを指定
open_jtalk_dict_dir = './open_jtalk_dic_utf_8-1.11'
text = 'これは音声合成のデモンストレーションです。'
OUTPUT_WAV = 'output.wav'
View install_synth.sh
#!/bin/bash
brew install wget
wget https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/onnxruntime-osx-arm64-1.13.1.tgz
tar xvzf onnxruntime-osx-arm64-1.13.1.tgz
mv onnxruntime-osx-arm64-1.13.1/lib/libonnxruntime.* ./
wget http://downloads.sourceforge.net/open-jtalk/open_jtalk_dic_utf_8-1.11.tar.gz
tar xvzf open_jtalk_dic_utf_8-1.11.tar.gz
View install_recog.sh
#!/bin/bash
# for MacOS
brew install wget
pip3 install vosk
pip3 install sounddevice
wget https://alphacephei.com/vosk/models/vosk-model-small-ja-0.22.zip