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 python3 | |
# MIT License | |
# Copyright (C) 2024 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, |
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
;; 起動時間をメッセージバッファに表示 | |
(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を無効化 |
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
;; 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) |
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
"""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: |
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 -*- | |
"""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 |
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 -*- | |
"""音声パワーと基本周波数をリアルタイムモニタリングする. | |
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 |
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
# メロディ推定のデモンストレーション | |
# brew install timidity | |
# brew install libsndfile | |
# pip install tensorflow | |
# pip install tensorflow_hub | |
# pip install music21 | |
# pip install pydub | |
import math |
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
# 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 |
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 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' |
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
#!/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 |
NewerOlder