Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 2-directional RTP to play a prompt when talking to agent. #13

Open
wants to merge 4 commits into
base: mantissa
Choose a base branch
from

Conversation

mo-g
Copy link
Contributor

@mo-g mo-g commented Nov 10, 2022

No description provided.

@mo-g mo-g added this to the v0.1.0 milestone Nov 10, 2022
@mo-g mo-g added the enhancement New feature or request label Nov 10, 2022
@mo-g mo-g force-pushed the bidirtp branch 2 times, most recently from 5687b9c to f350b14 Compare November 16, 2022 14:26
@mo-g
Copy link
Contributor Author

mo-g commented Nov 16, 2022

Quick note, analysing the waveform for a particular sound, it consists of three clicks, each one followed by a lower amplitude tone. Measuring the wavelength gives approximately 1000, 1000, 1250 Hz. 987.77Hz (B5) and 1244.51Hz (Eb6) seem to be adequate guesses, and are also a good ratio to the boatswain's call in TOS (low high low in that case). The clicks are not a single frequency for short duration, but are complex.

@mo-g
Copy link
Contributor Author

mo-g commented Nov 17, 2022

Make that { freq: "B5", length: 500},{ freq: "D6", length: 1000},{ freq: "B5", length: 500}

@mo-g
Copy link
Contributor Author

mo-g commented Nov 21, 2022

I've managed to get some basic out of tune tone generation in place, though the library needs a lot more work - it's not a priority right now. Now I need to get more of the RTP library structured so it can handle two-way signals, as well as being hopefully - better written.

@mo-g
Copy link
Contributor Author

mo-g commented Dec 3, 2022

In case anyone's curious why this is here - it's my elintrc.json.

{
    "env": {
        "node": true,
        "es2021": true
    },
    "extends": "eslint:recommended",
    "overrides": [
    ],
    "parserOptions": {
        "ecmaVersion": "latest",
        "sourceType": "module"
    },
    "rules": {
    }
}

@mo-g mo-g force-pushed the bidirtp branch 3 times, most recently from 4a6d280 to 4ddaae6 Compare December 3, 2022 18:15
@mo-g
Copy link
Contributor Author

mo-g commented Dec 6, 2022

This'll be about the 50'th time I've squashed a chunk of 50 commits where I've spent hours doing annoying debugging for a simple error.

At this point, the code is restructured to where we have a separate RTPServer class, with the agent still functional. Bonus, initial testing shows the absence of an LPF makes precious little difference to our resample as far as STT is concerned - that gives us a big speedup, which makes us under budget for ms/sample on the Haswell Ultrabook VM that is my home test server, though I still need to test it on a couple others. If anyone wants to try this on a Pi 4 server that would be great data; my only Pi 4 is busy doing other things.

Most of this task is actually still left, as a lot of the work so far has really been cleanup (some of which split off and merged into Mantissa) - the codec classes need a lot of work, threading needs to be created and then we need to create some kind of audio buffer for passing back to the device. Bonus task, I'd like to fix the agent RTP server system so they're spawned on-demand rather than on launch - as that solves a problem with playing audio to the badge.

@mo-g
Copy link
Contributor Author

mo-g commented Feb 25, 2023

And another 50 squashed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant