mirror of
https://github.com/chliny/hass-tencentcloud-asr.git
synced 2026-07-31 05:13:56 +08:00
feat: support more ASR engine models
This commit is contained in:
@@ -52,6 +52,9 @@ class ASRSTT(stt.SpeechToTextEntity):
|
||||
|
||||
@property
|
||||
def supported_sample_rates(self) -> list[stt.AudioSampleRates]:
|
||||
model: str = self.hass.data.get(ModelKey, DefaultModel)
|
||||
if model.startswith("8k_"):
|
||||
return [stt.AudioSampleRates.SAMPLERATE_8000]
|
||||
return [stt.AudioSampleRates.SAMPLERATE_16000]
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user