Registry that resolves the best STT provider based on config and language.
// Source: https://github.com/mateaix/mateclaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package vip.mate.stt;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import vip.mate.system.model.SystemSettingsDTO;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* STT 提供商注册表.
*
* <p>Provider selection is two-stage:
* <ol>
* <li>If the user pinned a specific provider in settings, that wins.</li>
* <li>Otherwise sort all available providers by
* {@link SttProvider#autoDetectOrder(String)} — the per-language
* hook lets Whis
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key