Repository navigation
feat: show who the bot hears speaking while recording - #63
Merged
Merged
Conversation
VoiceCapture now reports when someone starts and stops speaking, and the Recorder counts them as speaking until 2 seconds after they stop. Each occupant in the recording status carries a speaking flag, the status is written at most once a second, and the Office Recorder rings the avatar of whoever is speaking, polling every second while a recording runs. Closes #54
…ing-f177ad # Conflicts: # apps/office-recorder/src/app/recorder/office-store.spec.ts # apps/office-recorder/src/app/recorder/office-store.ts
…ing-f177ad # Conflicts: # apps/bot/src/DiscordGateway.ts # apps/bot/test/Recorder.test.ts
…ing-f177ad # Conflicts: # apps/bot/test/Recorder.test.ts
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
While a recording runs, the "In the office" list now rings the avatar of whoever the bot hears speaking, so a mic that isn't getting through shows up straight away instead of as a gap in the transcript.
VoiceCaptureemitsStartedSpeaking/StoppedSpeakingfrom the receiver'sstartandendevents alongside the clips. The Recorder counts someone as speaking until 2 seconds afterend(Speaking.ts), so a sentence with short pauses is one flip. Clips are saved on their own fiber, so a slow upload doesn't hold the speaking state back.office.recording_status.occupantsgetsspeaking, andOccupantinrecording-requests/wiregetsspeaking: boolean. The gateway's own list is nowOfficeMember(without the flag). Rows written before this change read as not speaking, so the Activity keeps working until the bot writes a new status.PbAvatarhas aspeakinginput that draws the ring, andPersonhas an optionalspeakingthatPbPeoplepasses on.When nothing is recorded, the bot stays deafened, nobody is speaking, and the list looks the same as before.
Closes #54
How I tested it
Speaking.test.tscovers the 2-second hold, short pauses and separate speakers.Recorder.test.tscovers the status write throttle (a change waits for the next second), the hold running out, and nobody speaking once the recording stops.RecordingRequests.test.tscovers the speaking flag round trip and reading old rows without it.office-store.spec.tscovers the switch between the 1-second and 3-second polls. The avatar and people specs cover the ring.Checklist
vp run cipasses