// 与 proto 中 TranscribeService 枚举保持一致 enum TranscribeService { unknown(0, 'Unknown'), byteDance(1, 'ByteDance'), ali(2, 'Ali'), auto(3, 'Auto'), google(4, 'Google'), microsoft(5, 'Microsoft'); const TranscribeService(this.value, this.code); final int value; // 与后台 / env 字段(MeetServers)中保持一致的字符串编码 final String code; static TranscribeService fromCode(String code) { for (final s in TranscribeService.values) { if (s.code.toLowerCase() == code.trim().toLowerCase()) return s; } return TranscribeService.auto; } }