Skip to content

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

Open
mo-g wants to merge 4 commits into
mantissafrom
bidirtp
Open

Implement 2-directional RTP to play a prompt when talking to agent.#13
mo-g wants to merge 4 commits into
mantissafrom
bidirtp

Conversation

@mo-g

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

Copy link
Copy Markdown
Contributor

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

mo-g commented Nov 16, 2022

Copy link
Copy Markdown
Contributor Author

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

mo-g commented Nov 17, 2022

Copy link
Copy Markdown
Contributor Author

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

@mo-g

mo-g commented Nov 21, 2022

Copy link
Copy Markdown
Contributor Author

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

mo-g commented Dec 3, 2022

Copy link
Copy Markdown
Contributor Author

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

mo-g commented Dec 6, 2022

Copy link
Copy Markdown
Contributor Author

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

mo-g commented Feb 25, 2023

Copy link
Copy Markdown
Contributor Author

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.

1 participant