-
Notifications
You must be signed in to change notification settings - Fork 0
Development #40
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
Development #40
Changes from all commits
56e44f8
82db2b0
579683d
fad6d1a
a12de82
5d79afe
0f3af89
d5d90f6
cbf5fcd
5a5d1d5
207ba9b
76b9912
366b640
ebc7bb7
be9a086
3fc9146
914b789
938886f
7737a2f
3ea0d45
ee4de2a
3ae0527
25dc303
730dc88
bb266bd
7d70a13
d1f450d
5436727
d8c850e
1405787
1ad53b1
3956aed
a0b1f82
a2d0cea
6adf5b1
57df8ef
6bbabff
7672520
d56e12e
5aca8cf
f0cb455
dd0ffab
4f534c8
9095db5
979acca
008f0e0
c09bdcc
1cb53f6
ee60426
56967e2
cfcf2dd
1aa6813
5844084
4a6a8e5
693bfbc
326928e
a80e583
69800d3
365ef8e
61d9dcf
046c52f
7b33d13
638fb4e
59a7722
4a09f0b
99b9642
15efb3c
6ca3832
08355e7
0d7bb86
484caaf
a45dcfc
478e8ea
6ad992d
2fcaa47
4e39aa1
01b85b8
7a1ee84
8589ceb
0f9441b
ca487ed
a7b0ddf
9a96471
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,8 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import os | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import uuid | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import sys | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import subprocess | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import subprocess |
Copilot
AI
Apr 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto-updating dependencies at runtime via pip install --upgrade edge-tts has significant security and operational risks (downloads arbitrary code, requires network + write permissions, and will likely fail in the PyInstaller-built executable environment). Prefer surfacing a clear error with upgrade instructions (or pin/ship a compatible version) rather than attempting an in-app upgrade.
| # Track edge-tts update attempts to avoid repeated updates | |
| _edge_tts_update_attempted = False | |
| async def try_update_edge_tts(): | |
| """Attempt to update edge-tts package when API compatibility issues occur""" | |
| global _edge_tts_update_attempted | |
| if _edge_tts_update_attempted: | |
| logger.info("edge-tts update already attempted this session, skipping") | |
| return False | |
| _edge_tts_update_attempted = True | |
| logger.info("Attempting to update edge-tts package to fix API compatibility...") | |
| try: | |
| # Run pip upgrade in subprocess | |
| python_exe = sys.executable | |
| result = await asyncio.create_subprocess_exec( | |
| python_exe, "-m", "pip", "install", "--upgrade", "edge-tts", | |
| stdout=asyncio.subprocess.PIPE, | |
| stderr=asyncio.subprocess.PIPE | |
| ) | |
| stdout, stderr = await result.communicate() | |
| if result.returncode == 0: | |
| logger.info(f"edge-tts successfully updated: {stdout.decode()}") | |
| # Reload the edge_tts module | |
| try: | |
| import importlib | |
| global edge_tts | |
| if edge_tts: | |
| importlib.reload(edge_tts) | |
| logger.info("edge-tts module reloaded successfully") | |
| else: | |
| import edge_tts as new_edge_tts | |
| edge_tts = new_edge_tts | |
| logger.info("edge-tts module imported successfully") | |
| return True | |
| except Exception as e: | |
| logger.warning(f"edge-tts updated but module reload failed: {e}") | |
| logger.info("Restart the application to use the updated edge-tts") | |
| return False | |
| else: | |
| logger.error(f"edge-tts update failed: {stderr.decode()}") | |
| return False | |
| except Exception as e: | |
| logger.error(f"Failed to update edge-tts: {e}") | |
| return False | |
| # Track edge-tts update attempts to avoid repeated update guidance logs | |
| _edge_tts_update_attempted = False | |
| async def try_update_edge_tts(): | |
| """Log manual remediation guidance instead of attempting a runtime package update.""" | |
| global _edge_tts_update_attempted | |
| if _edge_tts_update_attempted: | |
| logger.info("edge-tts upgrade guidance already provided this session, skipping") | |
| return False | |
| _edge_tts_update_attempted = True | |
| python_exe = sys.executable or "python" | |
| logger.error( | |
| "Automatic runtime updates for edge-tts are disabled for security and reliability " | |
| "reasons. Please upgrade the dependency outside the application and restart it." | |
| ) | |
| logger.info( | |
| f"Manual upgrade command: {python_exe} -m pip install --upgrade edge-tts" | |
| ) | |
| return False |
Copilot
AI
Apr 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New 403-retry path (including the edge-tts update attempt) is untested. There are existing pytest tests for TTS providers; add a unit test that mocks edge_tts.Communicate.save to raise the 403 error and asserts the retry behavior (and that the updater is called at most once).
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,4 @@ | |
| This file is automatically updated during CI/CD builds | ||
| """ | ||
|
|
||
| __version__ = "1.3.1" | ||
| __version__ = "1.3.2" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Docker build/push step is commented out, but the
docker-buildjob still proceeds to generate release files and posts a PR comment claiming the image was built successfully. Either re-enable the build/push step or guard/disable the downstream steps so CI doesn't report a Docker image/tag that doesn't exist.