Hear the short replies, and read the other kind of callsign
Two things, both found by measuring rather than by reading the code. The voice-activity filter inside the recogniser is off. It was costing words: across a night of land-mobile captures it dropped 5-15% of what the same model finds without it -- 491 against 507, 339 against 384, 263 against 310 -- because a single-word over between two transmissions looks to a VAD exactly like the noise it exists to remove, and on a scanner those short replies are the ones worth having. Turning it off has a cost, and the cost is that Whisper hands back "You" for five seconds of hiss as confidently as it hands back a sentence. So the whole capture is now asked once whether anything in it rises above its own noise. Digital silence measures 0.0 dB of contrast and hiss at any level 0.7, while the quietest real capture of that night measures 8.9 and most measure 10-27; the bar sits at 3, an order of magnitude clear of both. It can veto a capture but never trim one, which is the whole difference between it and the filter it replaces. The second thing: callsigns like WQVF960 were being missed entirely. The shape being matched was the amateur one -- prefix, district digit, suffix -- and everything else the FCC licenses is written the other way round, the letters first and then the digits. On the GMRS and business channels that is most of what is said: nine callsigns across five transcripts of one evening went by unrecognised, and now do not. The shape is written as the three allocations that exist rather than as "letters then digits", which claims KN95, WD40 and KC135. Its letters are checked against the word list even when they arrive as a single token, which the amateur shape does not need -- no English word has a digit in the middle of it, but "west 120" and "word 100" fit this one exactly. Lookups now fall back to hamdb.org when callook has nothing. Not a spare copy: callook holds United States amateur licences only, so DL1ABC and VE3ABC are INVALID there and resolve perfectly well from the other. And a GMRS callsign is not looked up at all -- every database reachable without an account is an amateur register, so reporting WQVF960 as "unlisted" would blame the callsign for the absence of a source. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
parent
0f378c4d6c
commit
8a789e57e1
14 changed files with 679 additions and 74 deletions
|
|
@ -78,7 +78,7 @@ def no_network(monkeypatch):
|
|||
it failed printed a real operator's address. A stub that is forgotten
|
||||
should fail loudly rather than work.
|
||||
"""
|
||||
def refuse(self, call):
|
||||
def refuse(self, url, call):
|
||||
raise AssertionError(f"a test tried to look up {call} for real")
|
||||
|
||||
monkeypatch.setattr(CallsignBook, "_request", refuse)
|
||||
|
|
@ -774,7 +774,7 @@ class StubBook(CallsignBook):
|
|||
self.requested = []
|
||||
super().__init__(cache=(tmp or Path("/nonexistent")) / "c.json", **kw)
|
||||
|
||||
def _request(self, call):
|
||||
def _request(self, url, call):
|
||||
self.requested.append(call)
|
||||
if call not in self.answers:
|
||||
raise OSError("offline")
|
||||
|
|
@ -828,9 +828,9 @@ def test_a_callsign_broken_by_the_recogniser_is_still_found(net, tmp_path):
|
|||
|
||||
def test_the_lookup_is_shown_as_pending_before_it_lands(net, tmp_path):
|
||||
class Slow(StubBook):
|
||||
def _request(self, call):
|
||||
def _request(self, url, call):
|
||||
time.sleep(1.0)
|
||||
return super()._request(call)
|
||||
return super()._request(url, call)
|
||||
|
||||
b = browser(net)
|
||||
b.book = Slow({"KU0W": KU0W}, tmp=tmp_path)
|
||||
|
|
@ -920,9 +920,9 @@ def test_no_lookup_contacts_nothing(net, capsys, monkeypatch):
|
|||
made = []
|
||||
|
||||
class Watching(StubBook):
|
||||
def _request(self, call):
|
||||
def _request(self, url, call):
|
||||
made.append(call)
|
||||
return super()._request(call)
|
||||
return super()._request(url, call)
|
||||
|
||||
monkeypatch.setattr("bandsaunter.browse.CallsignBook",
|
||||
lambda **kw: Watching({"KU0W": KU0W}, tmp=net, **kw))
|
||||
|
|
@ -979,7 +979,7 @@ def test_the_listing_carries_the_band_beside_the_frequency(library, capsys):
|
|||
# ---------------------------------------------------------------------------
|
||||
|
||||
def _stub_lookup(monkeypatch):
|
||||
def respond(self, call):
|
||||
def respond(self, url, call):
|
||||
return {"status": "VALID", "name": "ARRL HQ OPERATORS CLUB",
|
||||
"address": {"line2": "NEWINGTON, CT 06111"},
|
||||
"location": {"latitude": "41.714775",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue