fix: fix lint error

pull/21891/head
ytqh 1 year ago
parent a222a038a2
commit 38d3687994

@ -3,16 +3,19 @@ import logging
import uuid
from typing import Optional
from werkzeug.datastructures import FileStorage
from constants import AUDIO_EXTENSIONS
from core.model_manager import ModelManager
from core.model_runtime.entities.model_entities import ModelType
from models.model import App, AppMode, AppModelConfig, Message
from services.errors.audio import (AudioTooLargeServiceError,
NoAudioUploadedServiceError,
ProviderNotSupportSpeechToTextServiceError,
ProviderNotSupportTextToSpeechServiceError,
UnsupportedAudioTypeServiceError)
from werkzeug.datastructures import FileStorage
from services.errors.audio import (
AudioTooLargeServiceError,
NoAudioUploadedServiceError,
ProviderNotSupportSpeechToTextServiceError,
ProviderNotSupportTextToSpeechServiceError,
UnsupportedAudioTypeServiceError,
)
FILE_SIZE = 30
FILE_SIZE_LIMIT = FILE_SIZE * 1024 * 1024
@ -76,9 +79,10 @@ class AudioService:
):
from collections.abc import Generator
from flask import Response, stream_with_context
from app import app
from extensions.ext_database import db
from flask import Response, stream_with_context
def invoke_tts(text_content: str, app_model: App, voice: Optional[str] = None):
with app.app_context():

Loading…
Cancel
Save