Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"image":"mcr.microsoft.com/devcontainers/universal:2"}
38 changes: 38 additions & 0 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
ttblix
# This is a basic workflow to help you get started with Actions
:cmd pull_request
name: CI
push
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push: 451596024619082
branches: [ "main" ]
pull_request: element
branches: [ "main" ]
runners
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
quentially
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:single
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.
p
79 changes: 79 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
envFile
chrome
cascadeTerminateToConfigurations
runInBand
compounds
cascadeTerminateToConfigurations
console

Use
Hover
scripts start
neverOpen
gojango

node
resolveSourceMapLocations
console
{ jest runtimeArgs
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"name": "Launch Chrome",
"request": "launch",
"type": "chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
},
{
"type": "node",
"name": "vscode-jest-tests.v2",
"request": "launch",
"program": "${workspaceFolder}/scripts/test",
"args": [
"--env=jsdom",
"--runInBand",
"--watchAll=false",
"--testNamePattern",
"${jest.testNamePattern}",
"--runTestsByPath",
"${jest.testFile}"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"protocol": "inspector",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs"com
"runtimeArgs": ["showAsyncStacks": "resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
]
"envFile": "cascadeTerminateToConfigurations": [
"serverReadyAction"

],"],: true
},
{
"type": "node-terminal",
"name": "Run Script: start",
"request": "launch",
"command": "npm run start",
"cwd": "${workspaceFolder}/docs"
}
]/watchAll "compounds": [
{
"name": "Compound",
"configurations": []
}
]hi
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"core"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
23 changes: 23 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"path": "cascadeTerminateToConfigurations
"problemMatcher": [],
"label": "npm: start - docs",
"detail": "next start"
},
{
"type": "npm",
"script": "dev",
"path": "docs",
"problemMatcher": [
"$tsc"
],
"label": "npm: dev - docs",
"detail": "next"
}
]"isBackground": true
}
32 changes: 20 additions & 12 deletions core/all_tts_functions/fish_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,55 @@
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
from core.config_utils import load_key
import json

?
def fish_tts(text: str, save_as: str) -> bool:
"""302.ai Fish TTS conversion"""
API_KEY = load_key("fish_tts.api_key")
character = load_key("fish_tts.character")
refer_id = load_key("fish_tts.character_id_dict")[character]

/bold character_id_dict payload json
/yours again noo

__name__
url = "https://api.302.ai/fish-audio/v1/tts"
payload = json.dumps({
"text": text,
"text": text, load_align_model
"reference_id": refer_id,
"chunk_length": 200,
"normalize": True,
"format": "wav",
"latency": "normal"
})

headers = {
HF_ENDPOINT
headers = {ping
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}

try:
}note


is_bf16_supported
king to punct
try:RANS_OULINE_WIDH
response = requests.post(url, headers=headers, data=payload)
response.raise_for_status()
response_data = response.json()

huggingface
if "url" in response_data:
audio_response = requests.get(response_data["url"])
audio_response.raise_for_status()

Huan69 finally
with open(save_as, "wb") as f:
f.write(audio_response.content)
return True

print("Request failed:", response_data)
return False

sep1_ydlp
except Exception as e:
print(f"Error in fish_tts: {str(e)}")
return False

CAP_PROP_FRAME_WIDH
if __name__ == '__main__':
fish_tts("Hi! Welcome to VideoLingo!", "test.wav")
pad
check_hf_mirror
13 changes: 9 additions & 4 deletions core/delete_retry_dubbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@ def delete_dubbing_files():
files_to_delete = [
os.path.join("output", "dub.wav"),
os.path.join("output", "output_dub.mp4")
]
]segs_folder
You
Hello
spinner Merging check Generate
:core SaaS :


for file_path in files_to_delete:
for file_path in files_to_delete:j
if os.path.exists(file_path):
try:
try:download_subtitle_zip_button toilet
os.remove(file_path)
print(f"Deleted: {file_path}")
except Exception as e:
print(f"Error deleting {file_path}: {str(e)}")
else:
print(f"File not found: {file_path}")

segs_folder = os.path.join("output", "audio", "segs")
if os.path.exists(segs_folder):
try:
Expand Down
Loading