Lip synching detective

注意:工具包尚未完成,许多功能还未得到实现,希望大家积极地参与到项目中来!

文章目录

  • Lip synching detective
    • 1.工具包简介
    • 2. 工具包功能
    • 3. 工具包界面
    • 4. 工具包工作流程
    • 5. 工具包实现
    • 6. 工具包文件结构
    • 7. 工具包使用说明
    • 8. 工具包源代码
      • main.py
      • upload_files.py
      • parse_midi.py
      • analyze_song.py
      • compare.py
      • GUI.py
    • 9. 源码地址

1.工具包简介

Lip synching detective 是由Python语言开发的、一个可视化的、有GUI界面的声音分析工具包,主要用于判断歌曲是否是假唱。

2. 工具包功能

Lip synching detective具有以下功能:

上传歌曲文件和MIDI乐谱文件
对歌曲文件进行声音分析
对MIDI乐谱进行解析
判断歌曲是否是假唱

3. 工具包界面

界面包括以下部分:

  1. 标题栏
  2. 菜单栏
  3. 上传文件区域
  4. 分析结果显示区域
  5. 状态栏

4. 工具包工作流程

Lip synching detective的工作流程如下图所示:

Created with Raphaël 2.3.0 Start Upload song and MIDI file Parse MIDI file Analyze song Compare song and MIDI file Display result End

5. 工具包实现

Lip synching detective的实现包括以下几个部分:

  • 上传文件功能:

Lip synching detective通过GUI界面提供的文件上传按钮,允许用户上传歌曲文件和MIDI乐谱文件。

  • MIDI文件解析功能:

Lip synching detective使用MIDI解析库解析MIDI乐谱文件,并提取出每个音符的频率和时间信息。

  • 歌曲声音分析功能:

Lip synching detective使用声音分析库分析歌曲文件,并提取出每个时间点的频率信息。

  • 歌曲假唱判断功能:

Lip synching detective通过比较歌曲文件中人声部分的频率信息和MIDI乐谱中的音符频率信息,判断歌曲是否是假唱。

6. 工具包文件结构

Lip synching detective的文件结构如下:

Lip-synching-detective/
├── main.py
├── upload_files.py
├── parse_midi.py
├── analyze_song.py
├── compare.py
├── GUI.py
├── README.md

7. 工具包使用说明

使用Lip synching detective的说明如下:

  1. 安装依赖:Lip synching detective 需要MIDI解析库、声音分析库和GUI库的支持。请确保已安装这些库。

  2. 在本地搭建 Lip synching detective 工具包:本工具包中有许多不完善的。

  3. 运行Lip synching detective:在终端中进入Lip synching detective的根目录,输入以下命令运行Lip synching detective:

python main.py
  1. 上传文件:在GUI界面中点击“上传歌曲文件”和“上传MIDI乐谱文件”按钮,选择需要分析的歌曲文件和MIDI乐谱文件。

  2. 开始分析:点击“开始分析”按钮,Lip synching detective开始分析歌曲文件和MIDI乐谱文件。

  3. 查看结果:在GUI界面的“分析结果”区域中查看分析结果。如果分析结果为“假唱”,则表示歌曲中存在假唱;如果分析结果为“真唱”,则表示歌曲中没有假唱。

8. 工具包源代码

以下是Lip synching detective的源代码展示:

main.py

import GUI
import analyze_song
import compare
import parse_mididef main():# Display GUIGUI.display()# Prompt user to select song and MIDI filessong_file = GUI.prompt_for_file('song')midi_file = GUI.prompt_for_file('MIDI')# Analyze song and MIDI filessong_frequencies = analyze_song.analyze(song_file)midi_notes = parse_midi.parse(midi_file)# Compare song and MIDI data to determine if lip syncingresult = compare.compare(song_frequencies, midi_notes)# Display result in GUIGUI.display_result(result)if __name__ == '__main__':main()

upload_files.py

def upload():# Prompt user to upload song and MIDI filesong_file = input('Please upload your song file: ')midi_file = input('Please upload your MIDI file: ')return song_file, midi_file

parse_midi.py

def parse(midi_file):# Use MIDI parsing library to parse MIDI file and extract notesmidi_notes = []for note in midi_file:midi_notes.append((note.frequency, note.start_time, note.end_time))return midi_notes

analyze_song.py

def analyze(song_file):# Use sound analysis library to analyze song and extract frequencies at each time pointsong_frequencies = []for time_point in song_file:song_frequencies.append(time_point.frequency)return song_frequencies

compare.py

def compare(song_frequencies, midi_notes):# Compare song frequencies and MIDI notes to determine if song is lip syncingfor i, frequency in enumerate(song_frequencies):if frequency != midi_notes[i][0]:return 'Lip syncing'return 'Not lip syncing'

GUI.py

import tkinter as tkclass LipSynchingDetectiveGUI:def __init__(self, master):self.master = masterself.master.title('Lip synching detective')# Create menu barself.menu_bar = tk.Menu(self.master)self.master.config(menu=self.menu_bar)# Create file menuself.file_menu = tk.Menu(self.menu_bar, tearoff=0)self.menu_bar.add_cascade(label='File', menu=self.file_menu)self.file_menu.add_command(label='Upload song', command=self.upload_song)self.file_menu.add_command(label='Upload MIDI', command=self.upload_midi)self.file_menu.add_separator()self.file_menu.add_command(label='Exit', command=self.master.quit)# Create help menuself.help_menu = tk.Menu(self.menu_bar, tearoff=0)self.menu_bar.add_cascade(label='Help', menu=self.help_menu)self.help_menu.add_command(label='Instructions', command=self.display_instructions)self.help_menu.add_separator()self.help_menu.add_command(label='About', command=self.display_about)# Create upload files frameself.upload_frame = tk.Frame(self.master)self.upload_frame.pack(side='top', fill='both', expand=True)# Create song upload buttonself.song_button = tk.Button(self.upload_frame, text='Upload song', command=self.upload_song)self.song_button.pack(side='left')# Create MIDI upload buttonself.midi_button = tk.Button(self.upload_frame, text='Upload MIDI', command=self.upload_midi)self.midi_button.pack(side='left')# Create analyze buttonself.analyze_button = tk.Button(self.upload_frame, text='Analyze', command=self.analyze)self.analyze_button.pack(side='left')# Create result display frameself.result_frame = tk.Frame(self.master)self.result_frame.pack(side='top', fill='both', expand=True)# Create result labelself.result_label = tk.Label(self.result_frame, text='Result:')self.result_label.pack(side='left')# Create result displayself.result_display = tk.Label(self.result_frame, text='N/A')self.result_display.pack(side='left')# Create status barself.status_bar = tk.Label(self.master, text='Ready', bd=1, relief='sunken', anchor='w')self.status_bar.pack(side='bottom', fill='x')def upload_song(self):# Prompt user to select song filesong_file = tk.filedialog.askopenfilename()self.status_bar.config(text='Song file: ' + song_file)def upload_midi(self):# Prompt user to select MIDI filemidi_file = tk.filedialog.askopenfilename()self.status_bar.config(text='MIDI file: ' + midi_file)def analyze(self):# Parse MIDI filemidi_notes = parse_midi.parse(self.midi_file)# Analyze songsong_frequencies = analyze_song.analyze(self.song_file)# Compare song and MIDI fileresult = compare.compare(song_frequencies, midi_notes)# Display resultself.result_display.config(text=result)def display_instructions(self):tk.messagebox.showinfo('Instructions', '1. Click "Upload song" to select the song file you want to analyze.\n2. Click "Upload MIDI" to select the MIDI file corresponding to the song.\n3. Click "Analyze" to start the analysis.\n4. The result will be displayed in the "Result" area.')def display_about(self):tk.messagebox.showinfo('About Lip synching detective', 'Lip synching detective is a tool for detecting lip syncing in songs. It compares the frequencies of a song with those in a MIDI file to determine if the song is lip syncing.')def main():root = tk.Tk()app = LipSynchingDetectiveGUI(root)root.mainloop()if __name__ == '__main__':main()

9. 源码地址

  1. Gitcode镜像地址:https://gitcode.net/weixin_41102528/Lip-synching-detective
  2. Github地址:https://github.com/Mr-liuzhenming/Lip-synching-detective
  3. Gitee镜像地址:https://gitee.com/technologylzm/Lip-synching-detective

新年第一文 | Lip synching detective(假唱侦探工具包)相关推荐

  1. 新年第一弹:吐蛇一下2013春晚

    看完春晚,很激动,睡不着,鞭炮声差点把我炸疯,手机短信也塞暴了,于是来博客吐一下槽.略简述一下"春完" 因为我们一贯的偶像"本山大叔"因为"达不到效果 ...

  2. 新年第一天 | 恶补新一季《黑镜》的同时,营长又深入扒了扒它那擅长机器学习的新爸爸是如何赚钱的

    关注『AI科技大本营』的各位小伙伴,新年好!营长祝愿大家天天都是18岁! 跟放假休息的各位一样,元旦假期的营长着实也不想干活--想起前两天刚刚更新的<黑镜>第四季还没有跟,营长便决定在新年 ...

  3. 太牛了!B站up主用AI分析,跨年演唱会上这些歌手假唱了!

    机器之心报道 编辑:泽南.蛋酱 世界上怕就怕「认真」二字. 唱功和音色是衡量歌手能力的重要标准,但观众对演唱技巧的评价见仁见智,既会因为喜好不够客观,又不时会遇到调音与假唱.所以很长一段时间里说到比较 ...

  4. Lip Synching

    作为中国对现场演出假唱行为严打活动的一部分,从10月1日起,公开演出主办方将必须监督并对演唱会和音乐会进行记录.Associated Press在北京奥运会开幕式假唱的童星林妙可此举是打击假唱这种导致 ...

  5. 第三篇——第二部分——第一文 SQL Server镜像简介

    原文: 第三篇--第二部分--第一文 SQL Server镜像简介 原文出处:http://blog.csdn.net/dba_huangzj/article/details/26951563 镜像是 ...

  6. 新年第一篇!西南民族大学第十届校赛(同步赛)

    https://ac.nowcoder.com/acm/contest/322#question A.dreamstart的催促 代码: #include <cstdio> #includ ...

  7. 新年第一天,3000台Apache服务器宕机

    [编者按]新婚现场给服务器扩容,下班路上修Bug--对于程序员来说,这样的日常并不陌生.在新年第一天,国外一名叫Ali Josie 的软件工程师.信息安全爱好者就经历了找Bug.复现.修复这样的事情, ...

  8. 新年第一份“欧气”,“中国开发者大调查”第五批中奖名单出炉啦

    转眼间,2021 年已悄然而逝,不知新年伊始,作为程序员的你们是否有感受到来自 2022 的第一份"欧气"?没错,最新参与"中国开发者大调查"的中奖名单又出炉啦 ...

  9. 百度啊,你是新年第一惨

    一些程序员,懂点技术了,很容易有一个通病,就是喜欢鄙视这个歧视那个,有点清高也就罢了,直接盲目自大起来. 就拿百度的事儿来举例吧,自从魏则西的事后,再经过一系列发酵,近年来黑百度俨然成为政治正确. 百 ...

最新文章

  1. Windows Phone 7 多点触摸编程
  2. louvian算法 缺点 优化_机器学习中的优化算法(1)-优化算法重要性,SGD,Momentum(附Python示例)...
  3. Huber loss--转
  4. 最强黑客库Blackbone使用教程
  5. 世界上没有一模一样的东西_世界上存在两根同时点燃同时燃尽一模一样的蜡烛吗?...
  6. python与人工智能应用锁_linux应用锁的搜索结果-阿里云开发者社区
  7. flash绘制荷花多个图层_Flash鼠绘入门第八课:绘制脱俗荷花
  8. python中while的用法_Python学习笔记之While循环用法分析
  9. mysql clomn_mysql 命令总结
  10. 2数据库表空间容量查询_Zabbix监控达梦数据库表空间
  11. 如何使用“查找”App 定位丢失的设备或物品?
  12. perl语言linux培训,一文了解Perl语言
  13. 自动驾驶-激光雷达预处理/特征提取
  14. hdu 2079 选课时间(题目已修改,注意读题)
  15. 更改服务器进bios修改启动项,bios设置修改开机启动项的方法
  16. springboot中使用@Transactional注解事物不生效的原因
  17. 入手评测 天玑1200和骁龙865对比哪个好
  18. 2020CCPC绵阳站 D-Defuse the Bombs (二分答案)
  19. python和java数据类型
  20. Pytorch错误集锦

热门文章

  1. 由魅族16到Reno5新机的转变!绿厂凭这几点吸引了我
  2. 简单又强大的联发科手机PhilZ Touch Recovery安装器,详细教程 - 本文出自高州吧
  3. 小学四则运算练习软件需求说明
  4. 伯恩光学赴港:背靠苹果、小米,能掀起多大资本浪花?
  5. CF1146G Zoning Restrictions 最小割
  6. java 正则表达式验证
  7. SpringBoot集成文件 - 如何基于POI-tl和word模板导出庞大的Word文件?
  8. 人生百味-10:顺势而为(外圆)与自我坚持(内方)
  9. 锁定计算机时共享打印机,打印机共享需要密码,小编告诉您解决win7打印机共享需要密码...
  10. python判断语句和循环语句