* CTS regression fix

* PR review update
This commit is contained in:
Glenn Harper 2022-10-25 10:00:17 -07:00 коммит произвёл GitHub
Родитель e4a5af28d8
Коммит 3bc4dd907b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -116,8 +116,10 @@ export class TranscriberRecognizer extends Recognizer {
const audioConfigImpl = this.audioConfig as AudioConfigImpl;
const format: AudioStreamFormatImpl = await audioConfigImpl.format;
const channels = format.channels;
if (channels === 1 && this.properties.getProperty("f0f5debc-f8c9-4892-ac4b-90a7ab359fd2", "false").toLowerCase() !== "true") {
throw new Error("Single channel audio configuration for ConversationTranscriber is currently under private preview, please contact diarizationrequest@microsoft.com for more details");
if (channels === 1) {
if (this.properties.getProperty("f0f5debc-f8c9-4892-ac4b-90a7ab359fd2", "false").toLowerCase() !== "true") {
throw new Error("Single channel audio configuration for ConversationTranscriber is currently under private preview, please contact diarizationrequest@microsoft.com for more details");
}
} else if (channels !== 8) {
throw new Error(`Unsupported audio configuration: Detected ${channels}-channel audio`);
}