1. 目标
用 scipy.signal.stft 或 librosa.stft 画谱图(干净/带噪各一张)
2. 准备干净语料
准备干净的语音文件 clean.wav 放在合适的文件夹中。
3. 生成噪声语料并画出谱图
安装前一天没有安装,今天又需要的包:librosa 。
终端输入命令 pip install librosa 。

用 scipy.signal.stft 或 librosa.stft 画谱图(干净/带噪各一张)
准备干净的语音文件 clean.wav 放在合适的文件夹中。
安装前一天没有安装,今天又需要的包:librosa 。
终端输入命令 pip install librosa 。
找一个格式为 wav 的音频文件,放在合适的文件夹中。
例如我放在了这个文件夹 D:\document\speech_processing\speech_day1,命名为 iuput.wav 。
PyCharm: 文件-打开-选择音频所在文件夹 。
会提示:
FlowSE: Efficient and High-Quality Speech Enhancement via Flow Matching
Interspeech 2025
Generative models have excelled in audio tasks using approaches such as language models, diffusion, and flow matching. However, existing generative approaches for speech enhancement (SE) face notable challenges: language model-based methods suffer from quantization loss, leading to compromised speaker similarity and intelligibility, while diffusion models require complex training and high inference latency. To address these challenges, we propose FlowSE, a flow-matching-based model for SE. Flow matching learns a continuous transformation between noisy and clean speech distributions in a single pass, significantly reducing inference latency while maintaining high-quality reconstruction. Specifically, FlowSE trains on noisy mel spectrograms and optional character sequences, optimizing a condition flow matching loss with ground-truth mel spectrograms as supervision. It implicitly learns speech’s temporal-spectral structure and text-speech alignment. During inference, FlowSE can operate with or without textual information, achieving impressive results in both scenarios, with further improvements when transcripts are available. Extensive experiments demonstrate that FlowSE significantly outper forms state-of-the-art generative methods, establishing a new paradigm for generative-based SE and demonstrating the potential of flow matching to advance the field. Our code, pre-trained checkpoints, and audio samples are available at https://github.com/Honee-W/FlowSE/.
Index Terms: flow matching, generative models, speech enhancement
在任意地点创建一个 .txt 文件,只要保证后续 .py 文件和该 .txt 文件在同一目录即可。
文件内容如下:
1,2,3,4,5,6,7,8,9,0
0,9,8,7,6,5,4,3,2,1
python,c++,c,java,c#,html,css,javascript,php
社会,公正,民主,法治,文明,友善,和谐
大模型接入对战!
目的: 使我们纯python项目,可以融合其他功能。学会利用现有的 Python 基础,扩展新的功能。对于自己来说,要掌握快速上手新技术的能力。
核心点:
代码实现 🌟
原理探索探究 🌟🌟
实现思想 🌟🌟🌟
要知道如何向大模型接力,如何跟大模型交互、对话。这些无关代码、原理。作为“各个厂家大模型的调用者”要怎么去安排工作流程、分配任务等。
Impact of auditory attention decoding accuracy on noise reduction systems for hearing aids (2026)
[Biomedical Signal Processing and Control] SCIE,中科院2区(大类:医学;小类:工程:生物医学)
Hearing aid users often struggle to focus on a specific target speaker in multi-talker environments. Auditory attention decoding (AAD) algorithms, which extract attentional cues from electroencephalogram (EEG) signals, offer a potential solution. This study evaluates how AAD accuracy and decision window length affect the performance of a multichannel Wiener filter noise reduction system in a speaker and story-independent scenario. Simulations in two-speaker anechoic conditions show that, for decision windows of 1 s or less, AAD accuracies approximately above 81 % are required to meet minimum conversational speech quality (PESQ = 2.0), while accuracies approximately above 64 % suffice for intelligibility (STOI = 0.62). These results define quantitative performance targets for integrating AAD-based noise reduction into hearing aids and highlight the trade-off between decision latency, decoding accuracy, and perceptual benefit under idealized beamforming/VAD and anechoic conditions with high-density EEG.
EEG-based detection of the locus of auditory attention with convolutional neural networks (2021)
In a multi-speaker scenario, the human auditory system is able to attend to one particular speaker of interest and ignore the others. It has been demonstrated that it is possible to use electroencephalography (EEG) signals to infer to which speaker someone is attending by relating the neural activity to the speech signals. However, classifying auditory attention within a short time interval remains the main challenge. We present a convolutional neural network-based approach to extract the locus of auditory attention (left/right) without knowledge of the speech envelopes. Our results show that it is possible to decode the locus of attention within 1–2 s, with a median accuracy of around 81%. These results are promising for neuro-steered noise suppression in hearing aids, in particular in scenarios where per-speaker envelopes are unavailable.
设置-系统-系统信息-高级系统设置 ,找到右下角的环境变量。Path 。若没有所需版本,推荐官网下载安装包(次新版本)!
32/64 位根据 此电脑-属性 查看的系统情况选择。
安装程序启动,该页面选择 add python.exe to PATH 。
windows + R 再输入 cmd 打开电脑命令提示符。
思路:以玩家为中心,其他的信息都当做可以赋值的变量。
import random
class Game():
# 初始化玩家姓名、HP、敌人HP
def __init__(self, player_name):
self.player_name = player_name
self.player_hp = 100 # 直接在类和函数内部确定了玩家和敌人的血量
self.enemy_hp = 80 # 在确定敌人的血量同时,敌人姓名固定为 enemy
# 玩家操作攻击/防守
def actions(self):
self.action = input('Attack or Defense (A/D):')
if self.action == 'A':
self.enemy_hp -= random.randint(1, 20) # 玩家攻击,敌人血量减少
if self.enemy_hp <=0: # 敌人血量归零时用 return 停止
return
self.player_hp -= random.randint(1, 20) # 每回合敌人一定攻击,玩家正常减血就行
elif self.action == 'D':
self.player_hp -= random.randint(1, 20)/10 # 玩家防守,减血量为原本的 1/10
else:
print('Invalid action')
# main
player_name = input('请输入玩家姓名:')
player1 = Game(player_name) # 创建实例并完成初始化
while player1.player_hp > 0 and player1.enemy_hp >0:
# 显示玩家和敌人血量
print(f'{player1.player_name} HP: {player1.player_hp:.2f}')
print(f'Enemy HP: {player1.enemy_hp:.2f}')
# 调用操作函数,玩家选择攻击/防守
player1.actions()
if player1.player_hp > 0:
print('You win!')
else:
print('You lose!')
# ---output---
请输入玩家姓名:Ran
Ran HP: 100.00
Enemy HP: 80.00
Attack or Defense (A/D):A
Ran HP: 91.00
Enemy HP: 61.00
Attack or Defense (A/D):A
Ran HP: 79.00
Enemy HP: 48.00
Attack or Defense (A/D):A
Ran HP: 70.00
Enemy HP: 30.00
Attack or Defense (A/D):D
Ran HP: 68.80
Enemy HP: 30.00
Attack or Defense (A/D):D
Ran HP: 68.10
Enemy HP: 30.00
Attack or Defense (A/D):D
Ran HP: 67.60
Enemy HP: 30.00
Attack or Defense (A/D):A
Ran HP: 47.60
Enemy HP: 27.00
Attack or Defense (A/D):A
Ran HP: 40.60
Enemy HP: 26.00
Attack or Defense (A/D):A
Ran HP: 25.60
Enemy HP: 23.00
Attack or Defense (A/D):A
Ran HP: 7.60
Enemy HP: 8.00
Attack or Defense (A/D):D
Ran HP: 7.00
Enemy HP: 8.00
Attack or Defense (A/D):D
Ran HP: 6.60
Enemy HP: 8.00
Attack or Defense (A/D):A
You win!