Skip to content

Commit

Permalink
Fix package imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostis-S-Z committed Nov 27, 2024
1 parent 98a1f33 commit bf6abae
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/opennotebookllm/inference/text_to_speech.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
from src.opennotebookllm.inference.model_loaders import (
from opennotebookllm.inference.model_loaders import (
load_parler_tts_model_and_tokenizer,
)
from src.opennotebookllm.podcast_maker.config import SpeakerConfig
from opennotebookllm.podcast_maker.config import SpeakerConfig


def _speech_generation_parler(input_text: str, tts_config: SpeakerConfig) -> np.ndarray:
Expand Down
4 changes: 2 additions & 2 deletions src/opennotebookllm/podcast_maker/script_to_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import numpy as np

from src.opennotebookllm.inference.text_to_speech import text_to_speech
from opennotebookllm.inference.text_to_speech import text_to_speech
from scipy.io.wavfile import write

from src.opennotebookllm.podcast_maker.config import (
from opennotebookllm.podcast_maker.config import (
PodcastConfig,
SpeakerConfig,
speaker_1_description,
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from src.opennotebookllm.podcast_maker.config import (
from opennotebookllm.podcast_maker.config import (
PodcastConfig,
SpeakerConfig,
speaker_1_description,
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/test_text_to_text_to_speech.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os
from pathlib import Path

from src.opennotebookllm.inference.model_loaders import load_llama_cpp_model
from src.opennotebookllm.inference.text_to_speech import text_to_speech
from src.opennotebookllm.inference.text_to_text import text_to_text
from src.opennotebookllm.podcast_maker.config import PodcastConfig
from src.opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file
from opennotebookllm.inference.model_loaders import load_llama_cpp_model
from opennotebookllm.inference.text_to_speech import text_to_speech
from opennotebookllm.inference.text_to_text import text_to_text
from opennotebookllm.podcast_maker.config import PodcastConfig
from opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file


def test_text_to_text_to_speech(tmp_path: Path, podcast_config: PodcastConfig):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/inference/test_model_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from opennotebookllm.inference.model_loaders import load_llama_cpp_model
from transformers import PreTrainedModel, PreTrainedTokenizerBase

from src.opennotebookllm.inference.model_loaders import (
from opennotebookllm.inference.model_loaders import (
load_parler_tts_model_and_tokenizer,
)

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/inference/test_text_to_speech.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from pathlib import Path

from src.opennotebookllm.inference.text_to_speech import text_to_speech
from opennotebookllm.inference.text_to_speech import text_to_speech

from src.opennotebookllm.podcast_maker.config import PodcastConfig
from src.opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file
from opennotebookllm.podcast_maker.config import PodcastConfig
from opennotebookllm.podcast_maker.script_to_audio import save_waveform_as_file


def test_text_to_speech_parler(
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/podcast_maker/test_script_to_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import numpy as np

from src.opennotebookllm.podcast_maker.config import PodcastConfig
from src.opennotebookllm.podcast_maker.script_to_audio import (
from opennotebookllm.podcast_maker.config import PodcastConfig
from opennotebookllm.podcast_maker.script_to_audio import (
parse_script_to_waveform,
save_waveform_as_file,
)
Expand Down

0 comments on commit bf6abae

Please sign in to comment.