Skip to content

Instantly share code, notes, and snippets.

@tam17aki
tam17aki / watermark_spread_spectrum.py
Last active July 20, 2023 08:59
A python script to perform audio watermark embedding/detection on the basis of direct-sequence spread spectrum method.
#!/usr/bin/env python3
"""A python script to perform audio watermark embedding/detection
on the basis of direct-sequence spread spectrum method."""
# Copyright (C) 2020 by Akira TAMAMORI
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@tam17aki
tam17aki / record_sample.ipynb
Last active June 22, 2023 14:30
Google Colab上で音声を録音するサンプル
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tam17aki
tam17aki / gmhd.py
Last active June 11, 2023 11:39
Kernel mapped generalized Mahalanobis depth (kmGMHD) in Python.
# -*- coding: utf-8 -*-
"""Kernel mapped generalized Mahalanobis depth (kmGMHD).
"""
# Author: Akira Tamamori <tamamori5917@gmail.com>
# License: BSD 2 clause
from typing import NamedTuple, Union
import numpy as np
from sklearn.decomposition import KernelPCA
@tam17aki
tam17aki / mhd.py
Last active June 11, 2023 11:38
Mahalanobis Depth in Python.
# -*- coding: utf-8 -*-
"""Mahalanobis Depth."""
# Author: Akira Tamamori <tamamori5917@gmail.com>
# License: BSD 2 clause
from sklearn.covariance import EmpiricalCovariance, MinCovDet
from sklearn.utils import check_array, check_random_state
class MHD:
@tam17aki
tam17aki / se_pitchshift.py
Last active May 31, 2023 19:35
ピッチシフト (再生時間を変えずに音の高さを変える)
#!/usr/bin/env python3
""" 音声情報処理 n本ノック !! """
# Copyright (C) 2020 by Akira TAMAMORI
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@tam17aki
tam17aki / ZoneoutLSTMCell.py
Last active May 14, 2023 22:53
An implementation of zoneout regularizer on LSTM-RNN in Tensorflow
# Copyright (C) 2017 by Akira TAMAMORI
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
@tam17aki
tam17aki / watermark_echo_hiding.py
Last active April 9, 2023 17:44
A python script to perform audio watermark embedding/detection on the basis of echo hiding method.
#!/usr/bin/env python3
"""A python script to perform watermark embedding/detection
on the basis of echo hiding method."""
# Copyright (C) 2020 by Akira TAMAMORI
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@tam17aki
tam17aki / kernel_kmeans.py
Last active April 7, 2023 07:33 — forked from mblondel/kernel_kmeans.py
Kernel K-means.
# -*- coding: utf-8 -*-
"""Clustering with Kernel K-means."""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# Author: Akira Tamamori
# License: BSD 3 clause
import matplotlib.pyplot as plt
import numpy as np
from sklearn.base import BaseEstimator, ClusterMixin
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tam17aki
tam17aki / diffusion_model_book_2_2_score_based_model.ipynb
Last active March 6, 2023 15:45
diffusion_model_book_2_2_score_based_model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.