Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

软件dmg打包脚本可以共享一下吗? #4

Open
modstart opened this issue Oct 6, 2024 · 3 comments
Open

软件dmg打包脚本可以共享一下吗? #4

modstart opened this issue Oct 6, 2024 · 3 comments

Comments

@modstart
Copy link

modstart commented Oct 6, 2024

现在想要更新一下最新的版本,想本地重新打包一个版本,请问下有打包步骤或者脚本吗

@v3ucn
Copy link
Owner

v3ucn commented Oct 6, 2024

好的,等我先打包一下最新的25hz的试试,以前的不支持25hz

@modstart
Copy link
Author

modstart commented Oct 6, 2024

这个是使用pyinstaller打包的吗,学习一下

@v3ucn
Copy link
Owner

v3ucn commented Oct 7, 2024

这个是使用pyinstaller打包的吗,学习一下

是 pyinstaller,这是老版的打包配置,新版的25hz还没有测试,估计会报错:

# -*- mode: python ; coding: utf-8 -*-
import sys
sys.setrecursionlimit(5000)
from PyInstaller.utils.hooks import collect_data_files

datas = []
datas += collect_data_files('gradio_client')
datas += collect_data_files('gradio')
datas += collect_data_files('yapf_third_party')

# datas += [('cosyvoice', 'voices','conf','pretrained_models','参考音频')]


a = Analysis(
    ['webui.py',
    'cosyvoice/cli/__init__.py',
    'cosyvoice/cli/cosyvoice.py',
    'cosyvoice/cli/frontend.py',
    'cosyvoice/cli/model.py',
    'cosyvoice/cli/zh_normalization/char_convert.py',
    'cosyvoice/cli/zh_normalization/chronology.py',
    'cosyvoice/cli/zh_normalization/constants.py',
    'cosyvoice/cli/zh_normalization/num.py',
    'cosyvoice/cli/zh_normalization/phonecode.py',
    'cosyvoice/cli/zh_normalization/quantifier.py',
    'cosyvoice/cli/zh_normalization/text_normlization.py',

    'api.py',

    'cosyvoice/flow/decoder.py',
    'cosyvoice/flow/flow_matching.py',
    'cosyvoice/flow/flow.py',
    'cosyvoice/flow/length_regulator.py',

    'cosyvoice/hifigan/f0_predictor.py',
    'cosyvoice/hifigan/generator.py',

    'cosyvoice/llm/llm.py',
    
    'cosyvoice/transformer/__init__.py',
    'cosyvoice/transformer/activation.py',
    'cosyvoice/transformer/attention.py',
    'cosyvoice/transformer/convolution.py',
    'cosyvoice/transformer/decoder_layer.py',
    'cosyvoice/transformer/decoder.py',
    'cosyvoice/transformer/embedding.py',
    'cosyvoice/transformer/encoder_layer.py',
    'cosyvoice/transformer/encoder.py',
    'cosyvoice/transformer/label_smoothing_loss.py',
    'cosyvoice/transformer/positionwise_feed_forward.py',
    'cosyvoice/transformer/subsampling.py',
    
    'cosyvoice/utils/__init__.py',
    'cosyvoice/utils/class_utils.py',
    'cosyvoice/utils/common.py',
    'cosyvoice/utils/executor.py',
    'cosyvoice/utils/file_utils.py',
    'cosyvoice/utils/frontend_utils.py',
    'cosyvoice/utils/mask.py',
    'cosyvoice/utils/scheduler.py',
    'cosyvoice/utils/train_utils.py',

    'cosyvoice/dataset/__init__.py',
    'cosyvoice/dataset/dataset.py',
    'cosyvoice/dataset/processor.py',
    
    ],
    pathex=['/Users/liuyue/Downloads/CosyVoice-mac'],
    binaries=[],
    datas=datas,
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    noarchive=False,
    optimize=0,
    module_collection_mode={ 'gradio': 'py','cosyvoice': 'py','inflect': 'py','hyperpyyaml': 'py','conformer': 'py','diffusers': 'py',}
)
pyz = PYZ(a.pure)

exe = EXE(
    pyz,
    a.scripts,
    [],
    exclude_binaries=True,
    name='cosyvoice',
    icon='AnyConv.com__paints_logo.icns',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    console=True,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
)


a.datas += Tree('./audios', prefix='audios')
a.datas += Tree('./voices', prefix='voices')
a.datas += Tree('./pretrained_models', prefix='pretrained_models')



coll = COLLECT(
    exe,
    a.binaries,
    a.datas,
    strip=False,
    upx=True,
    upx_exclude=[],
    name='cosyvoice',
)


# app = BUNDLE(coll,
#     name='cosyvoice.app',
#     icon='AnyConv.com__paints_logo.icns',
#     bundle_identifier=None,
#     info_plist={
#        'NSPrincipalClass': 'NSApplication',
#        'NSAppleScriptEnabled': False,
#        'CFBundleDocumentTypes': [
#            {
#                'CFBundleTypeName': 'My File Format',
#                'CFBundleTypeIconFile': 'AnyConv.com__paints_logo.icns',
#                'LSItemContentTypes': ['com.example.myformat'],
#                'LSHandlerRank': 'Owner'
#                }
#            ]
#        },
#     )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants