Skip to content

Commit 6b38bf8

Browse files
committed
Add microphone array configuration
1 parent da67d3d commit 6b38bf8

File tree

3 files changed

+115
-0
lines changed

3 files changed

+115
-0
lines changed

articles/cognitive-services/Speech-Service/devices-sdk-release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The following sections list changes in the most recent releases.
1919

2020
## Speech Devices SDK 1.11.0:
2121

22+
- Support for [arbitrary microphone array geometries](how-to-devices-microphone-array-configuration.md) and setting the working angle through a [configuration file](https://aka.ms/sdsdk-micarray-json).
2223
- Support for [Urbetter DDK](http://www.urbetter.com/products_56/278.html).
2324
- Released binaries for the [GGEC Speaker](https://aka.ms/sdsdk-download-speaker) used in our [Voice Assistant sample](https://aka.ms/sdsdk-speaker).
2425
- Released binaries for [Linux ARM32](https://aka.ms/sdsdk-download-linux-arm32) and [Linux ARM 64](https://aka.ms/sdsdk-download-linux-arm64) for Raspberry Pi and similar devices.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: How to configure a Microphone Array - Speech Service
3+
titleSuffix: Azure Cognitive Services
4+
description: Learn how to configure a Microphone Array so that the Speech Devices SDK can utilize it.
5+
services: cognitive-services
6+
author: mswellsi
7+
manager: yanbo
8+
ms.service: cognitive-services
9+
ms.subservice: speech-service
10+
ms.topic: conceptual
11+
ms.date: 05/01/2020
12+
ms.author: wellsi
13+
---
14+
15+
# How to configure a Microphone Array
16+
17+
In this article, you learn how to configure a [microphone array](https://aka.ms/sdsdk-microphone), including setting the working angle, and how to select which microphone is used for the Speech Devices SDK.
18+
19+
The Speech Devices SDK works best with a microphone array that has been designed according to [our guidelines](https://aka.ms/sdsdk-microphone), and either exposes the microphone array configuration or the configuration is supplied through one of the following methods.
20+
21+
The Speech Devices SDK initially supported microphone arrays by selecting from a fixed set of configurations.
22+
23+
```java
24+
private static String DeviceGeometry = "Circular6+1"; // "Circular6+1", "Linear4",
25+
private static String SelectedGeometry = "Circular6+1"; // "Circular6+1", "Circular3+1", "Linear4", "Linear2"
26+
```
27+
28+
On Windows the microphone array configuration is supplied by the audio driver.
29+
30+
From v1.11.0 The Speech Devices SDK also supports configuration from a [JSON file](https://aka.ms/sdsdk-micarray-json).
31+
32+
33+
## Windows
34+
On Windows the microphone array geometry information is automatically obtained from the audio driver. So, the properties `DeviceGeometry` and `SelectedGeometry` as well as the new property `MicArrayGeometryConfigFile` are optional. We use the [JSON file](https://aka.ms/sdsdk-micarray-json) provided using `MicArrayGeometryConfigFile` for only getting the beamforming range.
35+
36+
If a microphone array is specified using `AudioConfig::FromMicrophoneInput`, then we use the specified microphone. If microphone is not specified or `AudioConfig::FromDefaultMicrophoneInput` is called, then we use the default microphone which is specified in Sound settings on Windows.
37+
The Microsoft Audio Stack in the Speech Devices SDK only supports down sampling for sample rates that are integral multiples of 16KHz.
38+
39+
## Linux
40+
On Linux the microphone geometry information must be provided. The use of `DeviceGeometry` and `SelectedGeometry` remains supported. It can also be provided via the JSON file using the `MicArrayGeometryConfigFile` property. Similar to Windows, the beamforming range cane be provided by the JSON file.
41+
42+
If a microphone array is specified using `AudioConfig::FromMicrophoneInput`, then we use the specified microphone. If a microphone is not specified or `AudioConfig::FromDefaultMicrophoneInput` is called, then we record from ALSA device named *default*. By default, *default* always points to card 0 device 0, but users can change it in the `asound.conf` file.
43+
44+
The Microsoft Audio Stack in the Speech Devices SDK only supports downsampling for sample rates that are integral multiples of 16KHz. Additionally the following formats are supported: 32-bit IEEE little endian float, 32-bit little endian signed int, 24-bit little endian signed int, 16-bit little endian signed int and 8-bit signed int.
45+
46+
## Android
47+
Currently only [Roobo v1](speech-devices-sdk-android-quickstart.md) is supported by te Speech Devices SDK. Behavior is same as previous releases, except now `MicArrayGeometryConfigFile` property can be used to specify JSON file containing beamforming range.
48+
49+
## Microphone Array Configuration JSON
50+
51+
The [JSON file](https://aka.ms/sdsdk-micarray-json) for microphone array geometry configuration will follow the JSON schema. Following are some examples that follow the schema.
52+
53+
54+
```json
55+
{
56+
"micArrayType": "Linear",
57+
"geometry": "Linear4"
58+
}
59+
```
60+
61+
62+
Or
63+
64+
65+
```json
66+
{
67+
"micArrayType": "Planar",
68+
"horizontalAngleBegin": 0,
69+
"horizontalAngleEnd": 360,
70+
"numberOfMicrophones": 4,
71+
"micCoord": [
72+
{
73+
"xCoord": 0,
74+
"yCoord": 0,
75+
"zCoord": 0
76+
},
77+
{
78+
"xCoord": 40,
79+
"yCoord": 0,
80+
"zCoord": 0
81+
},
82+
{
83+
"xCoord": -20,
84+
"yCoord": -35,
85+
"zCoord": 0
86+
},
87+
{
88+
"xCoord": -20,
89+
"yCoord": 35,
90+
"zCoord": 0
91+
}
92+
]
93+
}
94+
```
95+
96+
Or
97+
98+
```json
99+
{
100+
"micArrayType": "Linear",
101+
"horizontalAngleBegin": 70,
102+
"horizontalAngleEnd": 110
103+
}
104+
```
105+
106+
107+
## Next steps
108+
109+
> [!div class="nextstepaction"]
110+
> [Choose your speech device](get-speech-devices-sdk.md)

articles/cognitive-services/Speech-Service/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,10 @@
519519
href: speech-devices-sdk-roobo-v1.md
520520
- name: Roobo v2 details
521521
href: speech-devices-sdk-roobo-v2.md
522+
- name: How-to guides
523+
items:
524+
- name: How to configure a Microphone Array
525+
href: how-to-devices-microphone-array-configuration.md
522526
- name: Quickstart
523527
items:
524528
- name: Use Speech devices SDK

0 commit comments

Comments
 (0)