From 48226fd7f75cee6325978daa1dc1ce5c4d92011b Mon Sep 17 00:00:00 2001 From: wuliaozhiji Date: Thu, 24 Mar 2022 23:30:57 -0400 Subject: [PATCH] [M] Move non-api scripts to experiment\ --- .gitignore | 1 - {src => experiment}/accuracy_calculation.py | 0 {src => experiment}/bot.py | 0 {src => experiment}/ina_main.py | 0 {src => experiment}/utils.py | 0 {src => experiment}/validate_cn_celeb.py | 0 src/api.py | 7 +------ 7 files changed, 1 insertion(+), 7 deletions(-) rename {src => experiment}/accuracy_calculation.py (100%) rename {src => experiment}/bot.py (100%) rename {src => experiment}/ina_main.py (100%) rename {src => experiment}/utils.py (100%) rename {src => experiment}/validate_cn_celeb.py (100%) diff --git a/.gitignore b/.gitignore index e22fa55..439d703 100644 --- a/.gitignore +++ b/.gitignore @@ -119,7 +119,6 @@ dmypy.json ._* voice-bot-token.txt audio_tmp -src/voice-bot-token.txt venv8 venv9 diff --git a/src/accuracy_calculation.py b/experiment/accuracy_calculation.py similarity index 100% rename from src/accuracy_calculation.py rename to experiment/accuracy_calculation.py diff --git a/src/bot.py b/experiment/bot.py similarity index 100% rename from src/bot.py rename to experiment/bot.py diff --git a/src/ina_main.py b/experiment/ina_main.py similarity index 100% rename from src/ina_main.py rename to experiment/ina_main.py diff --git a/src/utils.py b/experiment/utils.py similarity index 100% rename from src/utils.py rename to experiment/utils.py diff --git a/src/validate_cn_celeb.py b/experiment/validate_cn_celeb.py similarity index 100% rename from src/validate_cn_celeb.py rename to experiment/validate_cn_celeb.py diff --git a/src/api.py b/src/api.py index dfbbf72..e3464b8 100644 --- a/src/api.py +++ b/src/api.py @@ -1,13 +1,8 @@ -import json - -import matplotlib.pyplot as plt -import numpy as np from parselmouth import Sound from scipy.stats import gaussian_kde from statistics import * - Feature = Literal['pitch', 'f1', 'f2', 'f3', 'tilt'] Gender = Literal['f', 'm'] @@ -15,7 +10,7 @@ Gender = Literal['f', 'm'] _kde_functions: dict[Feature, dict[Gender, gaussian_kde]] = {} -def load_kde(): +def load_kde() -> dict[Feature, dict[Gender, gaussian_kde]]: """ Load statistical results into kernel density functions