XiaozhiTtsOptions.java from joey-zhou/xiaozhi-esp32-server-java
// Source: https://github.com/joey-zhou/xiaozhi-esp32-server-java | License: MIT | Copyright 2025 joey
// Provided via justclaw.it.com; keep this notice with the code.
package com.xiaozhi.ai.tts;
import lombok.Builder;
import lombok.Getter;
import org.springframework.ai.audio.tts.TextToSpeechOptions;
/**
* TTS 参数配置对象,封装 voiceName/speed/pitch 等参数。
* 直接实现 Spring AI 的 {@link TextToSpeechOptions} 接口,与 Spring AI TTS 生态无缝集成。
* <p>
* 所有 TTS Provider 在构造时接收此对象,替代原来的 4 个独立参数。
*/
@Getter
@Builder
public class XiaozhiTtsOptions implements TextToSpeechOptions {
/**
* 音色名称
*/
private final String voiceName;
/**
* 语速 (0.5-2.0),1.0 为默认速度
*/
@Builder.Default
private final Double speed = 1.0;
/**
* 音调 (0.5-2.0),1.0 为默认音调
*/
@Builder.Defaul
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key