@webgal-tools/voice
Version:
WebGAL GPT-SoVITS语音合成应用
43 lines • 2.32 kB
TypeScript
import { ITranslationService, TranslationResult } from './interface.js';
import { TranslateConfig, CharacterVoiceConfig } from '../config.js';
/**
* 空白翻译类
* 当用户的配置的translate.check为false,或者角色的translate_to为空时使用
* 不进行翻译,直接返回原文
*/
export declare class NoTranslationService implements ITranslationService {
translate(character: string, originalText: string, targetLanguage: string, config: TranslateConfig, characterConfig?: CharacterVoiceConfig, context?: string): Promise<TranslationResult>;
}
/**
* 静态翻译类
* 当用户translate.check为true,且角色的配置设置了auto为false或没有设置时使用
* 进行常规翻译,不进行情绪识别
*/
export declare class StaticTranslationService implements ITranslationService {
private translateService;
constructor(translateService: any);
translate(character: string, originalText: string, targetLanguage: string, config: TranslateConfig, characterConfig?: CharacterVoiceConfig, context?: string): Promise<TranslationResult>;
}
/**
* 自动情绪识别翻译类
* 当用户translate.check为true,且角色的配置设置了auto为true时使用
* 进行翻译和情绪识别,自动选择最合适的模型文件
*/
export declare class AutoEmotionTranslationService implements ITranslationService {
private translateService;
private gptSovitsPath;
constructor(translateService: any, gptSovitsPath: string);
translate(character: string, originalText: string, targetLanguage: string, config: TranslateConfig, characterConfig?: CharacterVoiceConfig, context?: string): Promise<TranslationResult>;
}
/**
* 纯情绪识别翻译类
* 当用户禁用翻译(translate.check为false)但启用动态情绪选择(auto为true)时使用
* 不进行翻译,只进行情绪识别和模型文件选择
*/
export declare class EmotionOnlyTranslationService implements ITranslationService {
private translateService;
private gptSovitsPath;
constructor(translateService: any, gptSovitsPath: string);
translate(character: string, originalText: string, targetLanguage: string, config: TranslateConfig, characterConfig?: CharacterVoiceConfig, context?: string): Promise<TranslationResult>;
}
//# sourceMappingURL=implementations.d.ts.map