python-audio-autotest-3.10 1.5.7__py3-none-any.whl → 1.5.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyaatlibs/__init__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import platform
3
3
 
4
- __version__ = "1.5.7"
4
+ __version__ = "1.5.9"
5
5
  __author__ = "Hao-Wei Lee"
6
6
  if platform.system() == "Windows":
7
7
  SEP = "\\"
Binary file
pyaatlibs/audioworker.py CHANGED
@@ -63,7 +63,7 @@ class AudioWorkerApp(AppInterface):
63
63
 
64
64
  @staticmethod
65
65
  def get_apk_version():
66
- return "c66b90f-python-audio-autotest-v1.5.3"
66
+ return "068bd43-python-audio-autotest-v1.5.9"
67
67
 
68
68
  @staticmethod
69
69
  def get_version_from_device(serialno=None):
@@ -81,7 +81,8 @@ class AudioWorkerApp(AppInterface):
81
81
  def install(child, grant=False, serialno=None, tolog=True):
82
82
  super().install(grant=grant, serialno=serialno, tolog=tolog)
83
83
  __class__.log(
84
- "install: the installed version is '{}'".format(__class__.get_version_from_device()))
84
+ "install: the installed version is '{}'".format(
85
+ __class__.get_version_from_device(serialno=serialno)))
85
86
 
86
87
  @staticmethod
87
88
  def get_launch_component():
@@ -143,7 +144,7 @@ class AudioWorkerApp(AppInterface):
143
144
  @staticmethod
144
145
  def playback_nonoffload(
145
146
  device=None, serialno=None,
146
- freqs=[440.], playback_id=0, file="null",
147
+ freqs=[440.], playback_id=0, file="null", stream_type=3,
147
148
  fs=16000, nch=2, amp=0.6, bit_depth=16, low_latency_mode=False):
148
149
  name = __class__.AUDIOWORKER_INTENT_PREFIX + "playback.start"
149
150
  configs = {
@@ -155,7 +156,8 @@ class AudioWorkerApp(AppInterface):
155
156
  "amplitude": amp,
156
157
  "pcm-bit-width": bit_depth,
157
158
  "low-latency-mode": low_latency_mode,
158
- "file": file
159
+ "file": file,
160
+ "stream-type": stream_type
159
161
  }
160
162
  __class__.send_intent(device, serialno, name, configs)
161
163
 
@@ -396,7 +398,7 @@ class AudioWorkerApp(AppInterface):
396
398
  return __class__._common_info(device, serialno, "voip", "VoIPController", tolog=tolog)
397
399
 
398
400
  @staticmethod
399
- def voip_start(device=None, serialno=None, rxfreq=440., rxamp=0.6, rxspkr=False,
401
+ def voip_start(device=None, serialno=None, rxfreq=440., rxamp=0.6, rxspkr=False, rxfile="null",
400
402
  rxfs=8000, txfs=8000, rxnch=1, txnch=1, rxbit_depth=16, txbit_depth=16, dump_buffer_ms=0):
401
403
  name = __class__.AUDIOWORKER_INTENT_PREFIX + "voip.start"
402
404
  configs = {
@@ -406,6 +408,7 @@ class AudioWorkerApp(AppInterface):
406
408
  "rx-num-channels": rxnch,
407
409
  "rx-pcm-bit-width": rxbit_depth,
408
410
  "rx-use-spkr": rxspkr,
411
+ "rx-file": rxfile,
409
412
  "tx-sampling-freq": txfs,
410
413
  "tx-num-channels": txnch,
411
414
  "tx-pcm-bit-width": txbit_depth,
@@ -3,6 +3,7 @@ from unittest.mock import MagicMock
3
3
 
4
4
  import re
5
5
  import time
6
+ import packaging.version
6
7
 
7
8
  import pyaatlibs
8
9
  from pyaatlibs.audioworker import AudioWorkerApp, RecordPerf, RecordApi, RecordInputSrc
@@ -27,10 +28,7 @@ def serialno(pytestconfig):
27
28
 
28
29
  @pytest.fixture(scope="session")
29
30
  def target_version():
30
- try:
31
- return pyaatlibs.__version__
32
- except:
33
- return "1.4.3" # The first version since the apk had version name
31
+ return AudioWorkerApp.get_apk_version()
34
32
 
35
33
  @pytest.fixture(scope="session")
36
34
  def skip_version_check(pytestconfig):
@@ -158,19 +156,15 @@ def test_apk_version(check_options, target_version, serialno, skip_version_check
158
156
  if skip_version_check:
159
157
  pytest.skip("The version check is skipped.")
160
158
 
161
- out, err = Adb.execute(
162
- ["shell", "dumpsys package com.google.audioworker | grep versionName"], serialno=serialno)
163
- assert len(err) == 0
164
- assert len(out) > 0
159
+ apk_version = AudioWorkerApp.get_version_from_device(serialno=serialno)
160
+ assert len(apk_version) > 0
165
161
 
166
- vname_fmt = "versionName=" \
167
- + "(?P<commit_sha>{})\\-python\\-audio\\-autotest\\-v(?P<pyaat_version>{})$".format(
168
- SHORT_SHA_FMT, VERSION_FMT)
162
+ vname_fmt = "(?P<commit_sha>{})\\-python\\-audio\\-autotest\\-v(?P<pyaat_version>{})$".format(
163
+ SHORT_SHA_FMT, VERSION_FMT)
169
164
 
170
- m = re.match(vname_fmt, out.strip())
165
+ m = re.match(vname_fmt, apk_version)
171
166
  assert m is not None, "The version name '{}' is not valid.".format(out.strip())
172
- print(m.groupdict())
173
- assert m.groupdict()["pyaat_version"] >= target_version
167
+ assert apk_version == target_version
174
168
 
175
169
  def wait_for_activities(serialno, func, onset=True):
176
170
  retry = 10
@@ -529,7 +523,7 @@ def test_single_record(check_options, target_version, skip_function_check, seria
529
523
  assert wait_for_record_activities(serialno=serialno, onset=False)
530
524
 
531
525
  def test_concurrent_record(check_options, target_version, skip_function_check, serialno):
532
- if target_version < "1.5":
526
+ if packaging.version.parse(target_version.split("-")[-1]) < packaging.version.parse("1.5"):
533
527
  pytest.skip("This is only for PyAAT later than v1.5")
534
528
 
535
529
  if skip_function_check:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: python-audio-autotest-3.10
3
- Version: 1.5.7
3
+ Version: 1.5.9
4
4
  Summary: This is a auto-testing framework of audio functions for Android devices.
5
5
  Home-page: https://github.com/HW-Lee/AudioAutoTest
6
6
  Author: Hao-Wei Lee
@@ -11,12 +11,20 @@ Classifier: Operating System :: OS Independent
11
11
  Description-Content-Type: text/markdown
12
12
  License-File: LICENSE
13
13
  Requires-Dist: androidviewclient==22.3.1
14
- Requires-Dist: librosa==0.9.2
15
- Requires-Dist: matplotlib==3.5.3
16
14
  Requires-Dist: numpy==1.23.5
17
- Requires-Dist: scikit-learn==1.3.0
18
15
  Requires-Dist: scipy==1.10.1
16
+ Requires-Dist: scikit-learn==1.3.0
17
+ Requires-Dist: matplotlib==3.5.3
18
+ Requires-Dist: librosa==0.9.2
19
19
  Requires-Dist: sounddevice==0.4.5
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: requires-dist
27
+ Dynamic: summary
20
28
 
21
29
  # AudioAutoTest
22
30
  ## Description
@@ -26,6 +34,14 @@ This is a auto-testing framework of audio functions for Android devices.
26
34
 
27
35
  ## Release Note
28
36
  ### v1.5
37
+ ### v1.5.9
38
+ - Update audioworker.apk (068bd43-python-audio-autotest-v1.5.9)
39
+ - audioworker: voip: support customized file for VoIP downlink
40
+
41
+ ### v1.5.8
42
+ - Update audioworker.apk (47311b4-python-audio-autotest-v1.5.8)
43
+ - Add stream_type support and ble support
44
+
29
45
  ### v1.5.7
30
46
  - Update audioworker.apk (6d15fe8-python-audio-autotest-v1.5.7)
31
47
  - Add support to seek during the playback
@@ -1,4 +1,4 @@
1
- pyaatlibs/__init__.py,sha256=2_GKCfR0719Fkc2gaF9rvX41w_c8zjL61xQtiaCz47I,351
1
+ pyaatlibs/__init__.py,sha256=gBRpGCMSEl-RE7h6Dni6iPL0yAt6_dJ5XgZHyChwfFs,351
2
2
  pyaatlibs/aatapp.py,sha256=2oTnHnTCd4oIk_Nb218S3rO6nQfujxfVOLbQM1jeAhA,8742
3
3
  pyaatlibs/activitystatemachine.py,sha256=We5noxBtskgMUsdBOA34e8Rze8K-vuheuSBjL4RUo8Q,300
4
4
  pyaatlibs/adbutils.py,sha256=SV7N8UyC8bypNN58R63TkEu7R1ZHw-bQRedphcKHqjU,15431
@@ -7,7 +7,7 @@ pyaatlibs/argutils.py,sha256=6jOccgQlftmhUEGc3dAZ9-j0Mdg45jrhAGE-CylYjno,451
7
7
  pyaatlibs/audiofunction.py,sha256=7Lm_-dG88mK8ETRmu--vIyzXMPVPFiUbdwJmB4PQn9g,9640
8
8
  pyaatlibs/audiosignalframelogger.py,sha256=K0byfkpPAoMNNl6YdyoSGSgWbYPK1m0cLpQIPkeQlto,1446
9
9
  pyaatlibs/audiothread.py,sha256=GOEHPFtEK-P8SQNdgWeDxnHcs_vic2kTN68UCjWUiLM,6548
10
- pyaatlibs/audioworker.py,sha256=Tt_JtzZRXleCjrLXkHzlYfSKrfeEqAqlERzaDHZrIj8,26998
10
+ pyaatlibs/audioworker.py,sha256=MubXodNSOJuMD-QcO4OaRatVYo7d9K-wvMTfuG_HopY,27133
11
11
  pyaatlibs/logcatlistener.py,sha256=0Dz5wM1qOsxn-KcHspD2nCJnVu5g7rzbk5ycEDvxG08,6213
12
12
  pyaatlibs/logger.py,sha256=13Kx86hzFTbynWG5hKrWiCsT8gYk0-6ER98aOLiMJfY,5224
13
13
  pyaatlibs/signalanalyzer.py,sha256=F1TiLAqqSHLpm4KgslRgu7hjj4iRX1qyCZMDI21oxls,306
@@ -15,11 +15,11 @@ pyaatlibs/signalmatcher.py,sha256=6A4mLf6GLbQzdM0wFbHqDfyWvgpZRci90kaOrLeV8B0,18
15
15
  pyaatlibs/timeutils.py,sha256=yEgZGcHf_ASyXr0Mcef0toEa4zXX4j3FyQayaF1sN8I,2613
16
16
  pyaatlibs/trials.py,sha256=hSYIvR1vsEqfu20eLDeh3oDCCTWvHQcvS6LKfScLB30,2469
17
17
  pyaatlibs/apk/audiofunctionsdemo.apk,sha256=GG06POXrPOphMNsm5pD4XPfzVF8FXQ1ruupJFO2V8iQ,3205247
18
- pyaatlibs/apk/audioworker.apk,sha256=iOrkwKLupevx8ThKFLYoAmSIlHXpLmZwybPkekL_6qE,28920391
19
- pyaatlibs/tests/audioworker_test.py,sha256=OPGKrV10zw2UjyrBP55EWTe4838M40JHtmMIJnddnOo,21123
18
+ pyaatlibs/apk/audioworker.apk,sha256=ubfCnkCxU6wjH5TlE_WM7j93GMbHyRNRPa9_5rDw8tM,28947353
19
+ pyaatlibs/tests/audioworker_test.py,sha256=oKwi7TGh3apYG1SJlTYWTbCazJZya7wOCtYiytQvea8,20977
20
20
  pyaatlibs/tests/conftest.py,sha256=Ng_ClpNsY-62bo8O0zCl702jy9AcwdteakJ1vhlOCTk,293
21
- python_audio_autotest_3.10-1.5.7.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
22
- python_audio_autotest_3.10-1.5.7.dist-info/METADATA,sha256=jDF2VPVDs0ZnnhABaHeXBS7TBZhl4UZSPySxLCLCRgg,4550
23
- python_audio_autotest_3.10-1.5.7.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
24
- python_audio_autotest_3.10-1.5.7.dist-info/top_level.txt,sha256=MyCr1MMMQB2sjxyhlZSJPG4Fx10ya00APmhY7r1fSoQ,10
25
- python_audio_autotest_3.10-1.5.7.dist-info/RECORD,,
21
+ python_audio_autotest_3.10-1.5.9.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
22
+ python_audio_autotest_3.10-1.5.9.dist-info/METADATA,sha256=CdCIzgRbEF2z49nt7yiAqWkSyVqCu7nRMkjBKz3c6I4,4979
23
+ python_audio_autotest_3.10-1.5.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
24
+ python_audio_autotest_3.10-1.5.9.dist-info/top_level.txt,sha256=MyCr1MMMQB2sjxyhlZSJPG4Fx10ya00APmhY7r1fSoQ,10
25
+ python_audio_autotest_3.10-1.5.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.44.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5