Skip to content

Fix unrecorded bitrates being read as bad ones - #78

Merged
raj-khan merged 6 commits into
mainfrom
task-80-unknown-bitrate
Sep 19, 2026
Merged

raj-khan merged 6 commits into
mainfrom
task-80-unknown-bitrate

Conversation

@raj-khan

@raj-khan raj-khan commented Sep 19, 2026 •

Copy link
Copy Markdown
Owner

Why

This is the main reason you could not find anyone talking in Dhaka.

Radio Browser writes 0 when it has no bitrate on file, which normalizing turns into undefined. meetsQualityFloor read that as 0 kbps and dropped the station. Unknown was being judged as bad.

The gap is not small, and it falls hardest on exactly the stations the voices mode exists to find:

country live stations no bitrate on file
Nigeria 62 50%
India 93 49%
Egypt 47 45%
Bangladesh 23 43%

Bangladesh has six speech stations and was offering three: two Quran recitation channels and Jago FM, whose stream is off the air. Radio Vivid Voice and Spice FM are both tagged talk outright and were discarded only because nobody had recorded a bitrate. Nigeria lost thirteen of its eighteen the same way.

What changed

An unrecorded bitrate now passes the floor, and the stream probe decides. The probe already rejects anything that does not answer, which is the thing a listener actually cares about. A bitrate that is on file and genuinely below the floor is still refused, so the BBC World Service at 56 kbps still gets in and a 32 kbps music stream still does not.

Measured

Voices pool per country, before to after:

BD EG NG KE MX PK CU TR VN IN
before 3 2 5 4 3 8 1 9 14 8
after 6 9 18 10 5 10 2 10 17 8

Music pools roughly double in the same places (India 37 to 83, Nigeria 25 to 43).

Dhaka now offers six voice stations, and the three added are the ones tagged for speech all along: Radio Vivid Voice, Spice FM and Universal Health Radio.

A deliberate omission

The task asked for known-good bitrates to be preferred over unknown ones in ordering. I did not partition the candidate pool that way. Doing so would bury the unknown stations behind the same few known ones, which in Bangladesh means the probe would keep landing on the two Quran channels and the dead Jago FM: the exact complaint this fixes. Quality preference is applied where it costs no variety, in dedupe's betterEntry, which keeps the row that has a recorded bitrate when two entries describe one stream.

Checks

npm run lint, npm run format:check, npm run typecheck, npm test (435 passed) and npm run build pass, and the full Playwright suite (34 tests) passes locally.

raj-khan and others added 6 commits September 19, 2026 11:12
Asking for voices in Dhaka lands on one dead station. Measured causes:
Bangladesh has 26 directory entries against 23 brands Wikidata knows,
12 of those entries carry no tags at all, and both Jago FM rows share
one dead stream.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The directory is community edited, so a station is often filed twice
with one stream between the rows. Both Jago FM entries in Bangladesh
point at the same stream and it is off the air, so asking for voices
in Dhaka spent two of its attempts on the same silence.

Measured: Bangladesh 26 entries to 24, popular top 500 to 482.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every mock station shared one stream URL, so collapsing duplicate
streams correctly reduced them to a single entry and the end-to-end
expectations no longer held. Real stations have their own streams.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The directory writes 0 when it has no bitrate on file, so the quality
floor dropped the station outright. Of the live stations measured, 43%
in Bangladesh, 45% in Egypt and 50% in Nigeria carry no bitrate, and it
fell hardest on the stations the voices mode exists to find.

Bangladesh offered three voice stations out of six, two of them Quran
recitations and the third off the air. Radio Vivid Voice and Spice FM
are tagged talk and were dropped only for missing metadata.

Unknown now passes and the stream probe decides. A bitrate that is on
file and below the floor is still refused.

Measured voices pool: BD 3 to 6, EG 2 to 9, NG 5 to 18, KE 4 to 10.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@raj-khan
raj-khan merged commit da57149 into main Sep 19, 2026
3 checks passed
raj-khan added a commit that referenced this pull request Sep 19, 2026
* Add backlog for live and local radio coverage

Asking for voices in Dhaka lands on one dead station. Measured causes:
Bangladesh has 26 directory entries against 23 brands Wikidata knows,
12 of those entries carry no tags at all, and both Jago FM rows share
one dead stream.


* Collapse stations that share a stream URL

The directory is community edited, so a station is often filed twice
with one stream between the rows. Both Jago FM entries in Bangladesh
point at the same stream and it is off the air, so asking for voices
in Dhaka spent two of its attempts on the same silence.

Measured: Bangladesh 26 entries to 24, popular top 500 to 482.


* Format dedupe files with Prettier


* Give each mock station its own stream in the e2e fixtures

Every mock station shared one stream URL, so collapsing duplicate
streams correctly reduced them to a single entry and the end-to-end
expectations no longer held. Real stations have their own streams.


* Fix unrecorded bitrates being read as bad ones

The directory writes 0 when it has no bitrate on file, so the quality
floor dropped the station outright. Of the live stations measured, 43%
in Bangladesh, 45% in Egypt and 50% in Nigeria carry no bitrate, and it
fell hardest on the stations the voices mode exists to find.

Bangladesh offered three voice stations out of six, two of them Quran
recitations and the third off the air. Radio Vivid Voice and Spice FM
are tagged talk and were dropped only for missing metadata.

Unknown now passes and the stream probe decides. A bitrate that is on
file and below the floor is still refused.

Measured voices pool: BD 3 to 6, EG 2 to 9, NG 5 to 18, KE 4 to 10.
@raj-khan
raj-khan deleted the task-80-unknown-bitrate branch September 19, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant