Skip to content

Commit

Permalink
fix after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
robotaref committed Oct 21, 2023
1 parent ce95567 commit 2fed686
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions vocode/streaming/transcriber/base_transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from vocode.streaming.models.model import BaseModel

from vocode.streaming.models.transcriber import TranscriberConfig
from vocode.streaming.utils.FillerModel import FillerModel
from vocode.streaming.utils.back_tracking_model import BackTrackingModel
from vocode.streaming.utils.interrupt_model import InterruptModel
from vocode.streaming.utils.worker import AsyncWorker, ThreadAsyncWorker
from vocode.utils.context_tracker.factory import ContextTrackerFactory
Expand Down Expand Up @@ -68,7 +68,7 @@ def __init__(
self.logger = logger or logging.getLogger(__name__)

if self.transcriber_config.skip_on_filler_audio:
self.skip_model: FillerModel = FillerModel(logger=self.logger)
self.skip_model: BackTrackingModel = BackTrackingModel(logger=self.logger)
self.interrupt_model_initialize_task = asyncio.create_task(
self.skip_model.initialize_embeddings()
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os
from typing import Optional

from vocode.streaming.utils.embedding_model import EmbeddingModel
Expand All @@ -23,11 +24,11 @@
]


class FillerModel(EmbeddingModel):
class BackTrackingModel(EmbeddingModel):
def __init__(self, embeddings_cache_path: str = os.path.join(
os.path.dirname(__file__), "filler_embeddings"),
embeddings_file: str = 'filler_embeddings',
openai_api_key: Optional[str] = None, logger: Optional[logging.Logger] = None):
os.path.dirname(__file__), "filler_embeddings"),
embeddings_file: str = 'filler_embeddings',
openai_api_key: Optional[str] = None, logger: Optional[logging.Logger] = None):
self.phrases = FillerPhrases
self.strict_phrases = ["hmm", 'go on', "tell me more", "please continue"]
super().__init__(embeddings_cache_path, embeddings_file, openai_api_key, logger)
Expand Down

0 comments on commit 2fed686

Please sign in to comment.