惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
L
LINUX DO - 最新话题
Recorded Future
Recorded Future
月光博客
月光博客
博客园 - 【当耐特】
博客园 - 叶小钗
宝玉的分享
宝玉的分享
量子位
雷峰网
雷峰网
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Vercel News
Vercel News
L
LangChain Blog
B
Blog
Y
Y Combinator Blog
爱范儿
爱范儿
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
博客园 - Franky
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
云风的 BLOG
云风的 BLOG
C
Cisco Blogs
Scott Helme
Scott Helme
I
Intezer
T
The Exploit Database - CXSecurity.com
MyScale Blog
MyScale Blog
T
Tor Project blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Troy Hunt's Blog
N
News and Events Feed by Topic
大猫的无限游戏
大猫的无限游戏
F
Fortinet All Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Security Affairs
Cyberwarzone
Cyberwarzone
PCI Perspectives
PCI Perspectives
小众软件
小众软件
D
DataBreaches.Net
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Know Your Adversary
Know Your Adversary
Forbes - Security
Forbes - Security
S
Securelist
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
The Last Watchdog
The Last Watchdog

博客园 - 华腾智算

smart-water 融合多端协同总体架构设计方案 现代前端架构的核心思想 极简设计框架 跨平台弹性栅格理念设计 多端统一设计理念 一套规则,多端伸缩的UI设计理念 现代栅格设计之一 设计中的栅格系统 智慧水利顶层设计之何为“水利矩阵”与“数字孪生” 从古典Web到AI原生超级应用:团队学习路线与未来架构蓝图 最新架构设计 前端代码规范 v1.0 树型菜单全功能代码 最终最佳实践操作文档:统信UOS VSCode 全栈开发环境配置(基于 Chromium 浏览器) vscode-setting.json配置 VSCode 全栈开发环境初始化设置与跨平台配置指南(Windows/macOS 通用) VScode完整的跨平台适配方案 完整的跨平台 settings.json(飞雪飘鸿优化版) 数字孪生破局之道 完整的GLFW应用程序示例 雏形 程序方向 web三维 第一步,第一行,开始 绘制三角形 明确目标 从文本文件加载指令到模拟内存中,并显示前11个内存单元的内容 使用Python的pydub库播放音乐并打印二进制数据 python加密与解密 mainwindows.cpp 十进制数213转换为二进制数的完整过程,使用除2取余法(也称为“重复除法法”) 二进制数 \((-1101.101)_2\) 转换为十进制数 - 华腾智算
python的音频处理
华腾智算 · 2025-08-20 · via 博客园 - 华腾智算
from pydub import AudioSegment
from pydub.playback import play

song = AudioSegment.from_file("s.mp3", format="mp3")

print(len(song))
print('采样率',song.frame_rate) #采样率
print('时长',song.duration_seconds) #时长  
print('采样宽度',song.sample_width)# 采样宽度
print('声道数',song.channels) #声道数
#print('比特率',song.bit_rate) #比特率
#print('格式',song.format) #格式
#test_sound = AudioSegment.silent(duration=1000)  # 生成1秒的静音
#print("Pydub导入成功!音频对象已创建:", test_sound)
play(song)  

posted @ 2025-08-20 11:14  华腾智算  阅读(38)  评论(0)    收藏  举报