-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from jdibenes/mca5
1.0.27.0
- Loading branch information
Showing
26 changed files
with
425 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Microphone RAW (11 channels) | ||
# 0 ok (top left?) | ||
# 1 ok (top center?) | ||
# 2 ok (top right?) | ||
# 3 ok (bottom left?) | ||
# 4 ok (bottom right?) | ||
# 5 silent? | ||
# 6 silent? | ||
# 7 noise | ||
# 8 noise | ||
# 9 noise | ||
# 10 noise |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
extensions/client_matlab/viewer/client_stream_microphone_array.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
%% | ||
% This script records microphone audio from the HoloLens and plays it. | ||
|
||
%% Settings | ||
|
||
% HoloLens address | ||
host = '192.168.1.7'; | ||
|
||
% Recording length in seconds | ||
length = 10; | ||
|
||
% Channel | ||
% Options: | ||
% hl2ss.parameters_microphone.ARRAY_TOP_LEFT | ||
% hl2ss.parameters_microphone.ARRAY_TOP_CENTER | ||
% hl2ss.parameters_microphone.ARRAY_TOP_RIGHT | ||
% hl2ss.parameters_microphone.ARRAY_BOTTOM_LEFT | ||
% hl2ss.parameters_microphone.ARRAY_BOTTOM_RIGHT | ||
channel = hl2ss.parameters_microphone.ARRAY_TOP_LEFT; | ||
|
||
%% | ||
|
||
client = hl2ss.mt.sink_microphone(host, hl2ss.stream_port.MICROPHONE, 4096, hl2ss.audio_profile.RAW, hl2ss.aac_level.L5); | ||
client.open(); | ||
|
||
packet_duration = hl2ss.parameters_microphone.GROUP_SIZE_RAW / hl2ss.parameters_microphone.SAMPLE_RATE; | ||
packet_count = length / packet_duration; | ||
record = []; | ||
frame_index = -1; % -1 for most recent frame | ||
|
||
try | ||
while (packet_count > 0) | ||
data = client.get_packet_by_index(frame_index); | ||
if (data.status == 0) % got packet | ||
frame_index = data.frame_index + 1; | ||
record = [record, data.audio]; | ||
packet_count = packet_count - 1; | ||
else % no data | ||
pause(packet_duration * 10); % wait for data | ||
end | ||
end | ||
catch ME | ||
disp(ME.message); | ||
end | ||
|
||
client.close(); | ||
|
||
% play recorded sound | ||
sound(record(channel, :), hl2ss.parameters_microphone.SAMPLE_RATE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.