add ability to configure codecserver
This commit is contained in:
parent
9cd730dc9a
commit
d04ab43977
@ -86,6 +86,7 @@ class Dsp(DirewolfConfigSubscriber):
|
||||
self.secondary_pipe_names = {"secondary_shift_pipe": Pipe.WRITE}
|
||||
self.secondary_offset_freq = 1000
|
||||
self.unvoiced_quality = 1
|
||||
self.codecserver = None
|
||||
self.modification_lock = threading.Lock()
|
||||
self.output = output
|
||||
|
||||
@ -185,10 +186,10 @@ class Dsp(DirewolfConfigSubscriber):
|
||||
if which == "dmr":
|
||||
chain += [
|
||||
"dmr_decoder --fifo {meta_pipe} --control-fifo {dmr_control_pipe}",
|
||||
"mbe_synthesizer",
|
||||
"mbe_synthesizer {codecserver_arg}",
|
||||
]
|
||||
elif which == "ysf":
|
||||
chain += ["ysf_decoder --fifo {meta_pipe}", "mbe_synthesizer -y"]
|
||||
chain += ["ysf_decoder --fifo {meta_pipe}", "mbe_synthesizer -y {codecserver_arg}"]
|
||||
chain += ["digitalvoice_filter"]
|
||||
chain += [
|
||||
"CSDR_FIXED_BUFSIZE=32 csdr agc_s16 --max 30 --initial 3",
|
||||
@ -641,6 +642,15 @@ class Dsp(DirewolfConfigSubscriber):
|
||||
def get_unvoiced_quality(self):
|
||||
return self.unvoiced_quality
|
||||
|
||||
def set_codecserver(self, s):
|
||||
if self.codecserver == s:
|
||||
return
|
||||
self.codecserver = s
|
||||
self.restart()
|
||||
|
||||
def get_codecserver_arg(self):
|
||||
return "-s {}".format(self.codecserver) if self.codecserver else ""
|
||||
|
||||
def set_dmr_filter(self, filter):
|
||||
if self.has_pipe("dmr_control_pipe"):
|
||||
self.pipes["dmr_control_pipe"].write("{0}\n".format(filter))
|
||||
@ -754,6 +764,7 @@ class Dsp(DirewolfConfigSubscriber):
|
||||
output_rate=self.get_output_rate(),
|
||||
smeter_report_every=int(self.if_samp_rate() / 6000),
|
||||
unvoiced_quality=self.get_unvoiced_quality(),
|
||||
codecserver_arg=self.get_codecserver_arg(),
|
||||
audio_rate=self.get_audio_rate(),
|
||||
wfm_deemphasis_tau=self.wfm_deemphasis_tau,
|
||||
)
|
||||
|
@ -1,8 +1,9 @@
|
||||
from owrx.controllers.settings import SettingsFormController, SettingsBreadcrumb
|
||||
from owrx.form.section import Section
|
||||
from owrx.form.input import CheckboxInput, NumberInput, DropdownInput, Js8ProfileCheckboxInput, MultiCheckboxInput, Option
|
||||
from owrx.form.input import CheckboxInput, NumberInput, DropdownInput, Js8ProfileCheckboxInput, MultiCheckboxInput, Option, TextInput
|
||||
from owrx.form.input.wfm import WfmTauValues
|
||||
from owrx.form.input.wsjt import Q65ModeMatrix, WsjtDecodingDepthsInput
|
||||
from owrx.form.input.converter import OptionalConverter
|
||||
from owrx.wsjt import Fst4Profile, Fst4wProfile
|
||||
from owrx.breadcrumb import Breadcrumb, BreadcrumbItem
|
||||
|
||||
@ -40,6 +41,13 @@ class DecodingSettingsController(SettingsFormController):
|
||||
infotext="Determines the quality, and thus the cpu usage, for the ambe codec used by digital voice"
|
||||
+ " modes.<br />If you're running on a Raspberry Pi (up to 3B+) you should leave this set at 1",
|
||||
),
|
||||
TextInput(
|
||||
"digital_voice_codecserver",
|
||||
"Codecserver address",
|
||||
infotext="Address of a remote codecserver instance (name[:port]). Leave empty to use local"
|
||||
+ " codecserver",
|
||||
converter=OptionalConverter(),
|
||||
),
|
||||
CheckboxInput(
|
||||
"digital_voice_dmr_id_lookup",
|
||||
'Enable lookup of DMR ids in the <a href="https://www.radioid.net/" target="_blank">'
|
||||
|
@ -72,6 +72,7 @@ class DspManager(Output, SdrSourceEventClient):
|
||||
"start_mod",
|
||||
"start_freq",
|
||||
"wfm_deemphasis_tau",
|
||||
"digital_voice_codecserver",
|
||||
),
|
||||
)
|
||||
|
||||
@ -130,6 +131,7 @@ class DspManager(Output, SdrSourceEventClient):
|
||||
self.props.wireProperty("digital_voice_unvoiced_quality", self.dsp.set_unvoiced_quality),
|
||||
self.props.wireProperty("dmr_filter", self.dsp.set_dmr_filter),
|
||||
self.props.wireProperty("wfm_deemphasis_tau", self.dsp.set_wfm_deemphasis_tau),
|
||||
self.props.wireProperty("digital_voice_codecserver", self.dsp.set_codecserver),
|
||||
self.props.filter("center_freq", "offset_freq").wire(set_dial_freq),
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user