-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored output config slightly to make it cleaner to add more CLI …
…args in future, added all outputs to CLI logs, made CDG and video generation both optional
- Loading branch information
Showing
8 changed files
with
137 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
from lyrics_transcriber.core.controller import LyricsTranscriber, TranscriberConfig, LyricsConfig, OutputConfig | ||
from lyrics_transcriber.core.config import TranscriberConfig, LyricsConfig, OutputConfig | ||
from lyrics_transcriber.core.controller import LyricsTranscriber | ||
|
||
__all__ = ["LyricsTranscriber", "TranscriberConfig", "LyricsConfig", "OutputConfig"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
from dataclasses import dataclass, field | ||
from typing import Any, Dict, Optional | ||
|
||
|
||
@dataclass | ||
class TranscriberConfig: | ||
"""Configuration for transcription services.""" | ||
|
||
audioshake_api_token: Optional[str] = None | ||
runpod_api_key: Optional[str] = None | ||
whisper_runpod_id: Optional[str] = None | ||
|
||
|
||
@dataclass | ||
class LyricsConfig: | ||
"""Configuration for lyrics services.""" | ||
|
||
genius_api_token: Optional[str] = None | ||
spotify_cookie: Optional[str] = None | ||
|
||
|
||
@dataclass | ||
class OutputConfig: | ||
"""Configuration for output generation.""" | ||
|
||
output_styles_json: str | ||
max_line_length: int = 36 | ||
styles: Dict[str, Any] = field(default_factory=dict) | ||
output_dir: Optional[str] = os.getcwd() | ||
cache_dir: str = os.getenv("LYRICS_TRANSCRIBER_CACHE_DIR", "/tmp/lyrics-transcriber-cache/") | ||
render_video: bool = False | ||
generate_cdg: bool = False | ||
video_resolution: str = "360p" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.