Skip to content

Receive Only Channels + Different Zone/Channel Announce Text vs. Display Text#49

Open
crazyghost-12 wants to merge 18 commits intoWhackerLink:mainfrom
crazyghost-12:main
Open

Receive Only Channels + Different Zone/Channel Announce Text vs. Display Text#49
crazyghost-12 wants to merge 18 commits intoWhackerLink:mainfrom
crazyghost-12:main

Conversation

@crazyghost-12
Copy link

Receive Only Channels

  • This allows channels in a codeplug to be configured as receive only which prevents radios using that codeplug from transmitting on that channel.

_ Different Zone/Channel Announce Text vs. Display Text_

  • This allows zone and channel names to announce text that is different than what it displays. (Ex: Radio could display channel name "LawDisp" but announce "Law Dispatch" when switching to that channel)

@firealarmss firealarmss requested a review from Firav December 8, 2025 23:44
@firealarmss
Copy link
Contributor

@Firav looks good from what I can tell. Thoughts?

@Firav
Copy link
Contributor

Firav commented Dec 9, 2025

@firealarmss Did we ever fix the API issue we had with responsivevoice.org? We got ratelimited or something, thats why we had to disable it in the first place.

Copy link
Contributor

@Firav Firav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to re-enable responsiveVoice, we'll need to enable these lines again as well. Looks like you missed these for the scanner models too:
656-657
if (!isScannerModel()) {
// responsiveVoice.speak(${currentZone.name}, US English Female, {rate: .8});
// responsiveVoice.speak(${currentChannel.name}, US English Female, {rate: .8});
}

@crazyghost-12 crazyghost-12 requested a review from Firav December 9, 2025 02:53
@crazyghost-12
Copy link
Author

@Firav,
Updated, sorry!

Copy link
Contributor

@Firav Firav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<!-- <script src="https://code.responsivevoice.org/responsivevoice.js?key=PekkZld1"></script> -->

This line will need to be uncommented as well, else responsiveVoice doesnt work at all.

@Firav
Copy link
Contributor

Firav commented Dec 9, 2025

@firealarmss Did we ever fix the API issue we had with responsivevoice.org? We got ratelimited or something, thats why we had to disable it in the first place.

@firealarmss Do we want to just make the responsivevoice API key a user-configurable? Like we did with AVD?
Basically a bring-your-own-license model.

@crazyghost-12 crazyghost-12 requested a review from Firav December 11, 2025 18:49
@firealarmss
Copy link
Contributor

Yeah I think we should make this configurable so we don't hit a rate limit again. @Firav

Remove the announceZoneChannelChanges configuration option.
Added 'announceZoneChannelChanges' field to configuration.
Removed comment about enabling announceZoneChannelChanges.
Removed responsiveVoiceApiKey placeholder from config.
@Firav
Copy link
Contributor

Firav commented Dec 12, 2025

Yeah I think we should make this configurable so we don't hit a rate limit again. @Firav

@crazyghost-12 would that be some you'd like to implement, or would you like me to create another PR for it?

@crazyghost-12
Copy link
Author

Yeah I think we should make this configurable so we don't hit a rate limit again. @Firav

@crazyghost-12 would that be some you'd like to implement, or would you like me to create another PR for it?

I will attempt it!

@crazyghost-12
Copy link
Author

@Firav Can you look over lines 661-682? Before I do the rest..

@Firav
Copy link
Contributor

Firav commented Dec 12, 2025

@Firav Can you look over lines 661-682? Before I do the rest..

Yikes. That'll work in theory yeah, but we dont want to do that for every entry that uses responsiveVoice. Try making a function somewhere in the script.js that retrieves that information and stores it as a global variable that you can use later.

@crazyghost-12
Copy link
Author

@Firav Can you look over lines 661-682? Before I do the rest..

Yikes. That'll work in theory yeah, but we dont want to do that for every entry that uses responsiveVoice. Try making a function somewhere in the script.js that retrieves that information and stores it as a global variable that you can use later.

Ok sounds good, I'll try that. Sorry I have very very little coding experience and really just know the basics so I'm just kinda doing this to challenge myself. I'll give that a shot when I get off work tonight!

Added logic to fetch and check responsiveVoiceApiKey from config.yml, enabling/disabling responsive voice based on its presence.
@crazyghost-12
Copy link
Author

@Firav

How do lines 133-152 look (for the global var) and then 683-686 for checking the global var to announce the channel/zone? If everything looks good, I'll implement it to the other places where responsivevoice.speak is triggered and update the HTML file to include the config file's API key in the script header for responsive voice.

@firealarmss
Copy link
Contributor

If I recall correctly, I pass the entire parsed config option into the script.js on start. Is there a reason for reopening and parsing the config?

@crazyghost-12
Copy link
Author

If I recall correctly, I pass the entire parsed config option into the script.js on start. Is there a reason for reopening and parsing the config?

@Firav How about now... lines 104-141?

@Firav
Copy link
Contributor

Firav commented Dec 15, 2025

If I recall correctly, I pass the entire parsed config option into the script.js on start. Is there a reason for reopening and parsing the config?

@Firav How about now... lines 104-141?

Looking good! Just gotta finish out your logic for the rest of the responsiveVoice API calls and for the actual API key itself in the script inclusion. Also marked a change for you to review.

@crazyghost-12 crazyghost-12 requested a review from Firav December 15, 2025 20:23
@crazyghost-12
Copy link
Author

@Firav The remaining placed where responsiveVoice.speak were updated the only thing is, I'm not sure how to pull a YAML file value into HTML, so I was wondering if you'd be able to help me or do it yourself? Also, you mentioned you marked a change for me... where do I see that?

Copy link
Contributor

@firealarmss firealarmss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think I like that YAML parsing? @Firav ?

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.

3 participants