Giter Club home page Giter Club logo

umamusume-voice-text-extractor's Introduction

umamusume-voice-text-extractor

Install

Use binary files

Run from code

pydantic~=1.8.2
colorama~=0.4.4
pythonnet~=3.0.1
UnityPy~=1.9.21
requests~=2.31.0
PyQt5~=5.15.4
rich~=13.5.2

Usage

With GUI

  • Run binary file from Releases : run.bat
  • Run source code: python gui_main.py
  • Empty any of the Wave Format sections, the output will follow the original format.

Extract Single Character

  • Extract result example: xxx/xxx.wav|こんにちは
  • Click the target character, and then click Start.

Extract Multi Characters

  • Extract result example: xxx/xxx.wav|0|こんにちは
  • Double-click the target character to add to the list, you can modify the SaveID.

Live Music Extract

  • Click the target music, then click the target character.

Live Music Mixer

  • Right-click on the target character and add it to the target position. Parts greater than Singing Pos Count will be ignored.

No GUI

  • Edit and run main.py: python main.py
import voiceex

# set save folder, download when missing awb/acb files, get voice from all character stories (takes a long time), use cache (Save in "umacache" folder. You need to delete the cache file yourself after the game update.)
ex = voiceex.VoiceEx(save_path="save", download_missing_voice_files=True, get_voice_from_all_stories=False, use_cache=True)

# set wave sampling rate, bits, channels (optional)
ex.set_wav_format(22050, 16, 1)

# set download proxy (optional)
ex.set_proxies("http://127.0.0.1:10087")
  • Single Character Mode
# Single Character Mode
# start extract character No.1024 (MayanoTopgun)
ex.extract_all_char_text_single(1024)
  • Multi Character Mode
# Multi Character Mode
# Set character output id (Union[int, str])
ex.set_multi_char_out_ids([
    (1024, "0"), (1046, 1)
])
# start extract character No.1024 (MayanoTopgun) and No.1046 (SmartFalcon)
ex.extract_all_char_text_multi([1024, 1046])
  • The voice-text file is in {your save_path}/output.txt.

Extract Result

  • Voice files

  • Single character mode

  • Multi character mode

Special Thanks

umamusume-voice-text-extractor's People

Contributors

chinosk6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

umamusume-voice-text-extractor's Issues

[Enhancement] 读取live数据不全

有一些live音频文件并没有被读取

伴奏缺失

游戏中几乎所有live均有两个伴奏,分别为snd_bgm_live_xxxx_oke_01和snd_bgm_live_xxxx_oke_02
两者有细微的差别,一般02伴奏含有更少的背景杂音。以1001-马儿蹦跳传说为例,02不含01中的观众欢呼声

单击展开对比图片 这是01 这是02

本提取器目前仅能提取01音轨

缺少的live

  • 1052-プロムダンスパート 仅有伴奏
  • 1080-ドロワダンスパート 仅有伴奏
  • 9051-【MCパート】笑顏の宝物 -Beyond The Future!

这三个live的共同点是没有图标

修改建议

  • 提取BGM时生成两个文件,bgm1.wav和bgm2.wav,分别对应snd_bgm_live_xxxx_oke_01和snd_bgm_live_xxxx_oke_02
  • 将缺少的live添加至音乐列表

其它建议

  • 将默认Wave参数留空,即默认不进行重采样
  • 为混合器添加Wave参数选项
  • 为Live音乐提取添加多角色提取模式

[Enhancement] 混合器动态响度控制

在混合器中,由于不固定的歌唱角色的数量和静态的响度控制,多个角色同时歌唱的响度远大于单角色

单击展开与游戏原生播放live的对比

绿色音轨为混合器导出音轨,角色音量为默认值0.85
紫色音轨为游戏播放的live
红框位置为多角色同时歌唱(只标了我能听出来的部分)

可以发现,在多角色同时歌唱时混合器的响度高出了一大截
因此,应引入动态响度控制以保证响度的统一
即:

  • 在混合时,对角色的声音降低 $10\lg n$ dB,其中 $n$ 为同时歌唱的角色数量

ThrowOverflowOrFormatException

很抱歉再次打扰你
image
我在使用时报了onvert cueid failed: xxx - System.FormatException: Input string was not in a correct format.的错误
可能是cueidStr转换为int类型时出错
这是否影响数据的提取(提取出来是否是全的?

Running error with Gui

my program does not start, the full code goes as thus

D:\워쉽 보이스팩\umamusume_voice_text_extractor_executeable>.\umamusume_voice_text_extractor\umamusume_voice_text_extractor.exe
Traceback (most recent call last):
File "D:\chinosk_source\sdk_v2.6.5\umamusume_project\umamusume voice extractor\gui_main.py", line 3, in
File "gui\guimain.py", line 441, in ui_run_main
File "gui\guimain.py", line 438, in show_main_window
File "gui\guimain.py", line 285, in init_main_window
File "gui\guimain.py", line 134, in build_ve_chara_list
File "gui\guimain.py", line 144, in add_chara_to_list_widget
File "voiceex\live_music\live_music_ex.py", line 282, in get_char_icon
File "voiceex\live_music\live_music_ex.py", line 251, in _get_image
File "voiceex\database.py", line 18, in bundle_hash_to_path
TypeError: 'NoneType' object is not subscriptable
[6020] Failed to execute script 'gui_main' due to unhandled exception!

D:\워쉽 보이스팩\umamusume_voice_text_extractor_executeable>pause
계속하려면 아무 키나 누르십시오 . . .

bug:应用程序无法正常启动,以下是详细的错误信息,希望能够解决,谢谢

D:\下载\umamusume_voice_text_extractor_executeable>.\umamusume_voice_text_extractor\umamusume_voice_text_extractor.exe
Traceback (most recent call last):
File "D:\chinosk_source\sdk_v2.6.5\umamusume_project\umamusume voice extractor\gui_main.py", line 3, in
File "gui\guimain.py", line 445, in ui_run_main
File "gui\guimain.py", line 442, in show_main_window
File "gui\guimain.py", line 283, in init_main_window
File "voiceex\live_music\live_music_ex.py", line 14, in init
File "voiceex\resource.py", line 27, in init
File "voiceex\database.py", line 14, in init
sqlite3.OperationalError: unable to open database file
[1320] Failed to execute script 'gui_main' due to unhandled exception!

无法下载缺失的live音乐数据

在gui中的live音乐提取界面勾选下载缺失的文件不起效果,在角色语音提取处正常工作。勾选下载缺失的文件后选择提取BGM,控制台中没有相关下载输出,只会输出System.IO.FileNotFoundException: File not found

Failed to execute script 'gui_main' due to unhandled exception!

以下是整个报错信息:
\umamusume_voice_text_extractor.exe
Traceback (most recent call last):
File "D:\chinosk_source\sdk_v2.6.5\umamusume_project\umamusume voice extractor\gui_main.py", line 3, in
File "gui\guimain.py", line 391, in ui_run_main
File "gui\guimain.py", line 388, in show_main_window
File "gui\guimain.py", line 274, in init_main_window
File "voiceex\live_music\live_music_ex.py", line 13, in init
File "voiceex\resource.py", line 24, in init
File "voiceex\database.py", line 14, in init
sqlite3.OperationalError: unable to open database file
[23344] Failed to execute script 'gui_main' due to unhandled exception!

python版本3.10,相应安装包均为最新,求问应该如何打开GUI?

Unable to extract files from character stories in multi-character extraction mode/多角色模式不能提取故事语音

win11,使用GUI,Python版本3.10。
多角色模式不能提取故事语音,CMD内正常不报错。
单人模式就可以正常提取。
Win11, using GUI, Python==3.10.
In multi-character mode, the story audio cannot be extracted, but there is no error in CMD.
In single-character mode, the extraction works correctly.

GUI设定如下 GUI settings:
image

命令行 CMD:
image

实际输出的路径底下 output path:
image

[Bug] 混合器问题

很怪的一个bug

问题复现

Live 1034

把5个可用角色按顺序放进混合器,角色音量和wave参数留空,提取音量设置为1,开始混合
取得到的mix_by_parts_no_bgm.wav

点击查看图片

圈出来的绿色部分可以明显地看到一条竖线,即“啪”的电流声
此问题在全曲中多次出现,其它live暂未测试

相关信息

还是live1034,这次仅将小特和草女士放至1号和二号位,其它位置留空,查看频谱图发现几乎每个部分的开头和结尾都有这个问题

点击查看表格
具体的时间点整理
0:28.647
0:29.050
0:31.553
0:33.799
0:34.371
0:39.138
0:39.809
0:44.582
0:47.776
0:53.018
0:55.805
0:57.044
0:58.597
0:59.902
1:15.725
1:17.126
1:19.812

1:33后的时间没标

奇怪的背景噪声:在空白段中有不应存在的噪声

点击查看图片

图片

图示文件为上文提到的仅小特和草女士的无伴奏版本
为了能使噪音看起来更明显,对选区进行了+48dB增幅
在未作处理时,噪音响度在-84dB左右

怎么配置GUI环境呀

运行马娘文件夹的bat文件命令终端会报错,感觉前置环境没弄好,NET6和二进制文件都下载了,想了解一下如何配置呢?

卡死

有时会卡死,只显示
WARNING] xxx not found, try download...
等了半个小时没有反应
image

[Bug] 导出音频爆音

问题复现

混合器

很多歌曲能复现这个问题,这里以马儿蹦跳传说为例

  • 打开程序图形界面,选择live音乐提取->音乐1001,选中混合器,添加角色1001、1002、1003到3个歌唱位置
  • 点击“开始混合”
  • 得到mix_by_parts.wav
    此时,将其导入Au或类似的软件查看响度
点击查看图片
  • 不难发现,音频出现了明显的爆音问题

提取器

仅少量歌曲的伴奏会出现这个问题

  • 打开程序图形界面,选择live音乐提取->音乐1009,将“Wave参数”中的参数清空
  • 选择“提取BGM”
  • 得到bgm0.wav
    导入Au或类似的软件查看响度
点击查看图片
  • 音频在00:15、01:10、01:34处均出现爆音问题

最后,感谢大佬做的提取工具!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.