From 6969591b07a248c0b11dbc261554d01e5155b3cd Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Fri, 28 Jun 2024 12:47:37 +0530 Subject: [PATCH 1/8] Added schemas and specifications for phone_audio_input plugin --- commons/passive/phone/phone_audio_input.avsc | 11 +++++++++++ specifications/passive/android_phone-1.0.0.yml | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 commons/passive/phone/phone_audio_input.avsc diff --git a/commons/passive/phone/phone_audio_input.avsc b/commons/passive/phone/phone_audio_input.avsc new file mode 100644 index 00000000..2a89923c --- /dev/null +++ b/commons/passive/phone/phone_audio_input.avsc @@ -0,0 +1,11 @@ +{ + "namespace": "org.radarcns.passive.phone", + "type": "record", + "name": "PhoneAudioInput", + "doc": "Uncompressed high-quality audio data collected by the PhoneAudioInput plugin, making use of low-level classes that interact directly with hardware.", + "fields": [ + {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + {"name": "audioInputData", "type": "string", "doc": "Base64 encoded uncompressed audio input data captured by the device, sourced from a 16kHz .wav file." } + ] +} diff --git a/specifications/passive/android_phone-1.0.0.yml b/specifications/passive/android_phone-1.0.0.yml index bdbce9b5..f2d5546e 100644 --- a/specifications/passive/android_phone-1.0.0.yml +++ b/specifications/passive/android_phone-1.0.0.yml @@ -156,3 +156,11 @@ data: value_schema: .passive.phone.PhoneUserInteraction sample_rate: dynamic: true + # Phone Audio Input + - type: PHONE_AUDIO_INPUT + app_provider: .phone.PhoneAudioInputProvider + processing_state: RAW + topic: android_phone_audio_input + value_schema: .passive.phone.PhoneAudioInput + sample_rate: + dynamic: true \ No newline at end of file From 742443dafa1f3d4d4099998c9388fdf9974ba50e Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Thu, 11 Jul 2024 10:50:44 +0530 Subject: [PATCH 2/8] Updated the schema for phone_audio_input --- commons/passive/phone/phone_audio_input.avsc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/commons/passive/phone/phone_audio_input.avsc b/commons/passive/phone/phone_audio_input.avsc index 2a89923c..9b1d7c66 100644 --- a/commons/passive/phone/phone_audio_input.avsc +++ b/commons/passive/phone/phone_audio_input.avsc @@ -4,8 +4,21 @@ "name": "PhoneAudioInput", "doc": "Uncompressed high-quality audio data collected by the PhoneAudioInput plugin, making use of low-level classes that interact directly with hardware.", "fields": [ - {"name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, - {"name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, - {"name": "audioInputData", "type": "string", "doc": "Base64 encoded uncompressed audio input data captured by the device, sourced from a 16kHz .wav file." } + { "name": "time", "type": "double", "doc": "Device timestamp in UTC (s)." }, + { "name": "timeReceived", "type": "double", "doc": "Device receiver timestamp in UTC (s)." }, + { "name": "fileName", "type": "string", "doc": "Name of the audio file after it is saved to S3." }, + { "name": "filePath", "type": "string", "doc": "Path of the audio file retrieved after uploading to S3 storage." }, + { "name": "deviceName", "type": "string", "doc": "Name of the input audio device used for routing during this recording." }, + { "name": "deviceId", "type": "string", "doc": "Identifier associated with the input device used for audio recording." }, + { "name": "deviceSampleRates", "type": "string", "doc": "Supported sample rates of the input audio device." }, + { "name": "deviceEncodings", "type": "string", "doc": "Supported encodings of the input audio device." }, + { "name": "deviceType", "type": "string", "doc": "Type of the input audio device used for recording." }, + { "name": "deviceChannelCounts", "type": "int", "doc": "Supported channel counts of the input audio device." }, + { "name": "audioLength", "type": "long", "doc": "Length of the audio recording (in milliseconds)." }, + { "name": "audioFileSize", "type": "long", "doc": "Size of the audio file (in bytes)." }, + { "name": "hadPlayback", "type": "boolean", "doc": "Whether the recorded audio file was played before uploading to s3 storage." }, + { "name": "audioFileExtension", "type": "string", "doc": "Extension of the audio file." }, + { "name": "configuredSampleRate", "type": "int", "doc": "Sample rate for audio recording configured by firebase remote configs in application."}, + { "name": "configuredEncoding", "type": "string", "doc": "Encoding for audio recording configured by firebase remote configs in application." } ] } From cb52a7d828a9e6ed12406db0507d9fdfbbfbbd9d Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Fri, 19 Jul 2024 10:26:05 +0530 Subject: [PATCH 3/8] Updated processing state --- specifications/passive/android_phone-1.0.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/passive/android_phone-1.0.0.yml b/specifications/passive/android_phone-1.0.0.yml index f2d5546e..6ba44796 100644 --- a/specifications/passive/android_phone-1.0.0.yml +++ b/specifications/passive/android_phone-1.0.0.yml @@ -159,7 +159,7 @@ data: # Phone Audio Input - type: PHONE_AUDIO_INPUT app_provider: .phone.PhoneAudioInputProvider - processing_state: RAW + processing_state: RADAR topic: android_phone_audio_input value_schema: .passive.phone.PhoneAudioInput sample_rate: From 4f2742edcf095e9fccb306c280a960cdc75b2cdf Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Fri, 19 Jul 2024 12:58:31 +0530 Subject: [PATCH 4/8] Changing deviceChannelCounts type to string --- commons/passive/phone/phone_audio_input.avsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/passive/phone/phone_audio_input.avsc b/commons/passive/phone/phone_audio_input.avsc index 9b1d7c66..46fa510b 100644 --- a/commons/passive/phone/phone_audio_input.avsc +++ b/commons/passive/phone/phone_audio_input.avsc @@ -13,7 +13,7 @@ { "name": "deviceSampleRates", "type": "string", "doc": "Supported sample rates of the input audio device." }, { "name": "deviceEncodings", "type": "string", "doc": "Supported encodings of the input audio device." }, { "name": "deviceType", "type": "string", "doc": "Type of the input audio device used for recording." }, - { "name": "deviceChannelCounts", "type": "int", "doc": "Supported channel counts of the input audio device." }, + { "name": "deviceChannelCounts", "type": "string", "doc": "Supported channel counts of the input audio device." }, { "name": "audioLength", "type": "long", "doc": "Length of the audio recording (in milliseconds)." }, { "name": "audioFileSize", "type": "long", "doc": "Size of the audio file (in bytes)." }, { "name": "hadPlayback", "type": "boolean", "doc": "Whether the recorded audio file was played before uploading to s3 storage." }, From 0565780aa0d991d5efd37d8415280c6017edb913 Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Tue, 20 Aug 2024 18:45:05 +0530 Subject: [PATCH 5/8] PR feedback addressed --- commons/passive/{phone => audio}/phone_audio_input.avsc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename commons/passive/{phone => audio}/phone_audio_input.avsc (100%) diff --git a/commons/passive/phone/phone_audio_input.avsc b/commons/passive/audio/phone_audio_input.avsc similarity index 100% rename from commons/passive/phone/phone_audio_input.avsc rename to commons/passive/audio/phone_audio_input.avsc From 8cfce48d2b3572e1c1eac476f743e10c3d52487b Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Tue, 20 Aug 2024 18:47:42 +0530 Subject: [PATCH 6/8] Replacing audio-input plugins files to separate directories --- commons/passive/audio/phone_audio_input.avsc | 2 +- specifications/passive/android_phone-1.0.0.yml | 8 -------- .../passive/android_phone_audio-1.0.0.yml | 13 +++++++++++++ 3 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 specifications/passive/android_phone_audio-1.0.0.yml diff --git a/commons/passive/audio/phone_audio_input.avsc b/commons/passive/audio/phone_audio_input.avsc index 46fa510b..518a4565 100644 --- a/commons/passive/audio/phone_audio_input.avsc +++ b/commons/passive/audio/phone_audio_input.avsc @@ -1,5 +1,5 @@ { - "namespace": "org.radarcns.passive.phone", + "namespace": "org.radarcns.passive.audio", "type": "record", "name": "PhoneAudioInput", "doc": "Uncompressed high-quality audio data collected by the PhoneAudioInput plugin, making use of low-level classes that interact directly with hardware.", diff --git a/specifications/passive/android_phone-1.0.0.yml b/specifications/passive/android_phone-1.0.0.yml index 6ba44796..bdbce9b5 100644 --- a/specifications/passive/android_phone-1.0.0.yml +++ b/specifications/passive/android_phone-1.0.0.yml @@ -156,11 +156,3 @@ data: value_schema: .passive.phone.PhoneUserInteraction sample_rate: dynamic: true - # Phone Audio Input - - type: PHONE_AUDIO_INPUT - app_provider: .phone.PhoneAudioInputProvider - processing_state: RADAR - topic: android_phone_audio_input - value_schema: .passive.phone.PhoneAudioInput - sample_rate: - dynamic: true \ No newline at end of file diff --git a/specifications/passive/android_phone_audio-1.0.0.yml b/specifications/passive/android_phone_audio-1.0.0.yml new file mode 100644 index 00000000..e8e6ceac --- /dev/null +++ b/specifications/passive/android_phone_audio-1.0.0.yml @@ -0,0 +1,13 @@ +#====================================== Android Phone Audio =======================================# +vendor: ANDROID +model: PHONE +version: 1.0.0 +data: + # Phone Audio Input +- type: PHONE_AUDIO_INPUT + app_provider: .phone.PhoneAudioInputProvider + processing_state: RADAR + topic: android_phone_audio_input + value_schema: .passive.phone.PhoneAudioInput + sample_rate: + dynamic: true From 39d5ea1a75de7f2c2802479369fae1c3717e8cfb Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Tue, 20 Aug 2024 19:15:08 +0530 Subject: [PATCH 7/8] Minor change --- specifications/passive/android_phone_audio-1.0.0.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specifications/passive/android_phone_audio-1.0.0.yml b/specifications/passive/android_phone_audio-1.0.0.yml index e8e6ceac..7e1b8983 100644 --- a/specifications/passive/android_phone_audio-1.0.0.yml +++ b/specifications/passive/android_phone_audio-1.0.0.yml @@ -8,6 +8,6 @@ data: app_provider: .phone.PhoneAudioInputProvider processing_state: RADAR topic: android_phone_audio_input - value_schema: .passive.phone.PhoneAudioInput + value_schema: .passive.audio.PhoneAudioInput sample_rate: dynamic: true From 3a86883e1472df750641b982161e425947cc338f Mon Sep 17 00:00:00 2001 From: this-Aditya Date: Wed, 28 Aug 2024 19:26:51 +0530 Subject: [PATCH 8/8] Corrected indentation --- .../passive/android_phone_audio-1.0.0.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specifications/passive/android_phone_audio-1.0.0.yml b/specifications/passive/android_phone_audio-1.0.0.yml index 7e1b8983..433a35cb 100644 --- a/specifications/passive/android_phone_audio-1.0.0.yml +++ b/specifications/passive/android_phone_audio-1.0.0.yml @@ -4,10 +4,10 @@ model: PHONE version: 1.0.0 data: # Phone Audio Input -- type: PHONE_AUDIO_INPUT - app_provider: .phone.PhoneAudioInputProvider - processing_state: RADAR - topic: android_phone_audio_input - value_schema: .passive.audio.PhoneAudioInput - sample_rate: - dynamic: true + - type: PHONE_AUDIO_INPUT + app_provider: .phone.PhoneAudioInputProvider + processing_state: RADAR + topic: android_phone_audio_input + value_schema: .passive.audio.PhoneAudioInput + sample_rate: + dynamic: true