move assets to src folder
Browse files- .gitattributes +1 -0
- .gitignore +2 -2
- src/audio_generation.py +2 -3
- src/audio_generation_edge.py +1 -1
- {articles → src/public/articles}/Java9 ce mal aimé.md +0 -0
- {articles → src/public/articles}/Les differents Patterns de Transactions Distribuees.md +0 -0
- {articles → src/public/articles}/mocked_java9_openai_tts.wav +0 -0
- {articles → src/public/articles}/slidev.md +0 -0
- {output → src/public/output}/.gitkeep +0 -0
- src/script_generation.py +1 -1
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
articles/mocked_java9_openai_tts.wav filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
articles/mocked_java9_openai_tts.wav filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
src/public/articles/mocked_java9_openai_tts.wav filter=lfs diff=lfs merge=lfs -text
|
.gitignore
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
.venv
|
| 2 |
.env
|
| 3 |
-
output/*
|
| 4 |
*.pyc
|
| 5 |
-
__pycache__/
|
|
|
|
| 1 |
.venv
|
| 2 |
.env
|
| 3 |
+
./src/public/output/*
|
| 4 |
*.pyc
|
| 5 |
+
__pycache__/
|
src/audio_generation.py
CHANGED
|
@@ -9,7 +9,7 @@ from pathlib import Path
|
|
| 9 |
from script_generation import PodScript
|
| 10 |
@dataclass
|
| 11 |
class AudioConfig:
|
| 12 |
-
output_path: str = "./output"
|
| 13 |
api_key: str = os.getenv("OPENAI_API_KEY", "")
|
| 14 |
model: str = "gpt-4o-mini-tts"
|
| 15 |
mocked: bool = False
|
|
@@ -67,7 +67,6 @@ class ScriptToAudio:
|
|
| 67 |
input=text,
|
| 68 |
response_format="wav"
|
| 69 |
)
|
| 70 |
-
usage = response
|
| 71 |
tmp_path = tmp_file.name
|
| 72 |
with open(tmp_path, "wb") as f:
|
| 73 |
f.write(response.content)
|
|
@@ -128,7 +127,7 @@ class ScriptToAudio:
|
|
| 128 |
|
| 129 |
async def run(self, script:PodScript ,voice_1: str, voice_2: str) -> str:
|
| 130 |
if self._config.mocked:
|
| 131 |
-
return './articles/mocked_java9_openai_tts.wav'
|
| 132 |
|
| 133 |
try:
|
| 134 |
audio_files, folder_name = await self._text_to_speech(
|
|
|
|
| 9 |
from script_generation import PodScript
|
| 10 |
@dataclass
|
| 11 |
class AudioConfig:
|
| 12 |
+
output_path: str = "./src/public/output"
|
| 13 |
api_key: str = os.getenv("OPENAI_API_KEY", "")
|
| 14 |
model: str = "gpt-4o-mini-tts"
|
| 15 |
mocked: bool = False
|
|
|
|
| 67 |
input=text,
|
| 68 |
response_format="wav"
|
| 69 |
)
|
|
|
|
| 70 |
tmp_path = tmp_file.name
|
| 71 |
with open(tmp_path, "wb") as f:
|
| 72 |
f.write(response.content)
|
|
|
|
| 127 |
|
| 128 |
async def run(self, script:PodScript ,voice_1: str, voice_2: str) -> str:
|
| 129 |
if self._config.mocked:
|
| 130 |
+
return './src/public/articles/mocked_java9_openai_tts.wav'
|
| 131 |
|
| 132 |
try:
|
| 133 |
audio_files, folder_name = await self._text_to_speech(
|
src/audio_generation_edge.py
CHANGED
|
@@ -9,7 +9,7 @@ from pathlib import Path
|
|
| 9 |
from script_generation import PodScript
|
| 10 |
@dataclass
|
| 11 |
class AudioConfig:
|
| 12 |
-
output_path: str = "./output"
|
| 13 |
api_key: str = os.getenv("OPENAI_API_KEY", "")
|
| 14 |
model: str = "gpt-4o-mini-tts"
|
| 15 |
mocked: bool = False
|
|
|
|
| 9 |
from script_generation import PodScript
|
| 10 |
@dataclass
|
| 11 |
class AudioConfig:
|
| 12 |
+
output_path: str = "./src/public/output"
|
| 13 |
api_key: str = os.getenv("OPENAI_API_KEY", "")
|
| 14 |
model: str = "gpt-4o-mini-tts"
|
| 15 |
mocked: bool = False
|
{articles → src/public/articles}/Java9 ce mal aimé.md
RENAMED
|
File without changes
|
{articles → src/public/articles}/Les differents Patterns de Transactions Distribuees.md
RENAMED
|
File without changes
|
{articles → src/public/articles}/mocked_java9_openai_tts.wav
RENAMED
|
File without changes
|
{articles → src/public/articles}/slidev.md
RENAMED
|
File without changes
|
{output → src/public/output}/.gitkeep
RENAMED
|
File without changes
|
src/script_generation.py
CHANGED
|
@@ -6,7 +6,7 @@ from pydantic import BaseModel, Field
|
|
| 6 |
from mocked_script import mocked_raw_script
|
| 7 |
@dataclass
|
| 8 |
class ScriptConfig:
|
| 9 |
-
articles_path: str = "./articles"
|
| 10 |
model: str = "gpt-4o"
|
| 11 |
model_provider: str = "openai"
|
| 12 |
api_key: str = os.getenv("OPENAI_API_KEY", "")
|
|
|
|
| 6 |
from mocked_script import mocked_raw_script
|
| 7 |
@dataclass
|
| 8 |
class ScriptConfig:
|
| 9 |
+
articles_path: str = "./src/public/articles"
|
| 10 |
model: str = "gpt-4o"
|
| 11 |
model_provider: str = "openai"
|
| 12 |
api_key: str = os.getenv("OPENAI_API_KEY", "")
|