mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-11-30 16:02:58 +08:00
feat: 新增MAC微信发送消息 文字转语音 功能
This commit is contained in:
1 parent
9b7f5114bd
commit
4058a817dd
48 files changed
+7240
-22
No files matched your search
@@ -0,0 +1,29 @@
|
||||
export type PersonalWechatRuntimeState =
|
||||
| 'missing'
|
||||
| 'downloading'
|
||||
| 'ready'
|
||||
| 'invalid'
|
||||
| 'error'
|
||||
| 'unsupported'
|
||||
|
||||
export interface PersonalWechatRuntimeStatus {
|
||||
version: string
|
||||
state: PersonalWechatRuntimeState
|
||||
downloadedBytes: number
|
||||
totalBytes: number
|
||||
progress: number
|
||||
platform: NodeJS.Platform
|
||||
architecture: string
|
||||
supported: boolean
|
||||
removable: boolean
|
||||
directory?: string
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface PersonalWechatRuntimeDownloadResult {
|
||||
success: boolean
|
||||
status: PersonalWechatRuntimeStatus
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface PersonalWechatRuntimeProgressEvent extends PersonalWechatRuntimeStatus {}
|
||||
@@ -0,0 +1,84 @@
|
||||
export type PersonalWechatSenderState =
|
||||
| 'checking'
|
||||
| 'unsupported_platform'
|
||||
| 'wechat_not_running'
|
||||
| 'sip_enabled'
|
||||
| 'unsupported_version'
|
||||
| 'runtime_missing'
|
||||
| 'hook_not_ready'
|
||||
| 'stopped'
|
||||
| 'starting'
|
||||
| 'rebinding'
|
||||
| 'online'
|
||||
| 'error'
|
||||
|
||||
export interface PersonalWechatSenderStatus {
|
||||
state: PersonalWechatSenderState
|
||||
platform: string
|
||||
arch: string
|
||||
sipDisabled: boolean
|
||||
wechatRunning: boolean
|
||||
wechatPid?: number
|
||||
boundWechatPid?: number
|
||||
oneBotPid?: number
|
||||
endpoint: string
|
||||
endpointReady: boolean
|
||||
wechatVersion?: string
|
||||
runtimeReady: boolean
|
||||
executablePath?: string
|
||||
configPath?: string
|
||||
imagePath?: string
|
||||
attachReady: boolean
|
||||
baseAddress?: string
|
||||
baseAddressReady: boolean
|
||||
textHookInstalled: boolean
|
||||
textHookReady: boolean
|
||||
imageHookInstalled: boolean
|
||||
imageHookReady: boolean
|
||||
messageListenerReady: boolean
|
||||
canSend: boolean
|
||||
canSendText: boolean
|
||||
canSendImage: boolean
|
||||
canSendVoice: boolean
|
||||
message: string
|
||||
error?: string
|
||||
}
|
||||
|
||||
interface PersonalWechatSendBaseRequest {
|
||||
to: string
|
||||
isGroup: boolean
|
||||
}
|
||||
|
||||
export interface PersonalWechatSendTextRequest extends PersonalWechatSendBaseRequest {
|
||||
type: 'text'
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface PersonalWechatSendImageRequest extends PersonalWechatSendBaseRequest {
|
||||
type: 'image'
|
||||
filePath: string
|
||||
}
|
||||
|
||||
export interface PersonalWechatSendVoiceRequest extends PersonalWechatSendBaseRequest {
|
||||
type: 'voice'
|
||||
filePath: string
|
||||
}
|
||||
|
||||
export type PersonalWechatSendRequest =
|
||||
| PersonalWechatSendTextRequest
|
||||
| PersonalWechatSendImageRequest
|
||||
| PersonalWechatSendVoiceRequest
|
||||
|
||||
export interface PersonalWechatSendResult {
|
||||
success: boolean
|
||||
status: PersonalWechatSenderStatus
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface PersonalWechatImageSelectionResult {
|
||||
canceled: boolean
|
||||
path?: string
|
||||
name?: string
|
||||
}
|
||||
|
||||
export type PersonalWechatVoiceSelectionResult = PersonalWechatImageSelectionResult
|
||||
@@ -0,0 +1,75 @@
|
||||
export type TextToSpeechKeySource = 'secure-storage' | 'environment' | 'missing'
|
||||
export type TextToSpeechModel = 's2.1-pro-free' | 's2.1-pro'
|
||||
|
||||
export interface TextToSpeechVoice {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
tags: string[]
|
||||
languages: string[]
|
||||
source: 'fish-audio'
|
||||
coverImage?: string
|
||||
previewUrl?: string
|
||||
previewText?: string
|
||||
authorName?: string
|
||||
taskCount?: number
|
||||
likeCount?: number
|
||||
markCount?: number
|
||||
}
|
||||
|
||||
export interface TextToSpeechSettings {
|
||||
provider: 'fish-audio'
|
||||
hasApiKey: boolean
|
||||
hasStoredApiKey: boolean
|
||||
hasEnvironmentApiKey: boolean
|
||||
keySource: TextToSpeechKeySource
|
||||
encryptionAvailable: boolean
|
||||
selectedVoiceId: string
|
||||
outputFormat: 'mp3'
|
||||
model: TextToSpeechModel
|
||||
phase: 'ready'
|
||||
}
|
||||
|
||||
export interface TextToSpeechSettingsResult {
|
||||
success: boolean
|
||||
settings: TextToSpeechSettings
|
||||
voices: TextToSpeechVoice[]
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface SaveTextToSpeechSettingsRequest {
|
||||
apiKey?: string
|
||||
clearApiKey?: boolean
|
||||
selectedVoiceId?: string
|
||||
model?: TextToSpeechModel
|
||||
}
|
||||
|
||||
export interface ListTextToSpeechVoicesRequest {
|
||||
pageNumber?: number
|
||||
pageSize?: number
|
||||
title?: string
|
||||
language?: string
|
||||
tags?: string[]
|
||||
}
|
||||
|
||||
export interface ListTextToSpeechVoicesResult {
|
||||
success: boolean
|
||||
items: TextToSpeechVoice[]
|
||||
total: number
|
||||
pageNumber: number
|
||||
pageSize: number
|
||||
hasMore: boolean
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface SynthesizeTextToSpeechRequest {
|
||||
text: string
|
||||
referenceId: string
|
||||
}
|
||||
|
||||
export interface SynthesizeTextToSpeechResult {
|
||||
success: boolean
|
||||
filePath?: string
|
||||
audioDataUrl?: string
|
||||
error?: string
|
||||
}
|
||||
Reference in new issue
Block a user