/**
 * 语音相关最小实现占位（避免构建失败）
 * 提供 checkMeia 与 Tss 接口的简化实现
 */

export type TssEventHandlers = {
  onMessage?: (data: string) => void
  onError?: (e: unknown) => void
  onClose?: () => void
}

export class Tss {
  private handlers: TssEventHandlers
  private closed = false

  private constructor(handlers: TssEventHandlers) {
    this.handlers = handlers
  }

  static createInstance(handlers: TssEventHandlers): Tss {
    return new Tss(handlers)
  }

  /**
   * 关闭占位实例
   */
  close(): void {
    if (this.closed) return
    this.closed = true
    this.handlers.onClose?.()
  }
}

/**
 * 简化的麦克风权限检查，占位返回成功
 */
export async function checkMeia(): Promise<void> {
  // 仅作为占位，实际接入时替换为真实的麦克风权限检测逻辑
  return
}




