Skip to content

v0.2.0

Compare
Choose a tag to compare
@aconchillo aconchillo released this 03 Oct 22:36
· 219 commits to main since this release

New features

  • Support for start/stop recordings.
  • Support for start/stop transcriptions and receive transcriptions messages.

Improvements and fixes

  • Fixed an issue that was causing sporadic audio gaps on macOS and in certain OS task scheduling scenarios.
  • Network re-connections have been improved.

API changes

  • VirtualSpeakerDevice.read_frames() has been improved and doesn't require the user to add sleeps. Therefore, it is now possible to read, for example, 10 seconds of audio in a single call. Since the timings are now controlled internally, this minimizes any potential audio issues.

The following old code:

SAMPLE_RATE = 16000
READ_INTERVAL = 0.01
FRAMES_TO_READ = int(SAMPLE_RATE * READ_INTERVAL)
SECONDS_TO_READ = 10.0

for _ in range (int(SECONDS_TO_READ / READ_INTERVAL)):
  buffer = speaker.read_frames(FRAMES_TO_READ)
  time.sleep(READ_INTERVAL)

can be replaced with:

SECONDS_TO_READ = 10
FRAMES_TO_READ = SAMPLE_RATE * SECONDS_TO_READ
buffer = speaker.read_frames(FRAMES_TO_READ)