Integrate xombe vocoder as Git submodule and remove legacy mbe

This commit is contained in:
2026-11-27 21:55:45 +01:00
parent a37a025626
commit 49271fb013
63 changed files with 153 additions and 26301 deletions
+38 -46
View File
@@ -1,67 +1,59 @@
# tcd
# tcd-xombe
tcd is a hybrid digital voice transcoder for ham radio used by the new URF reflector.
Versione modificata di **tcd** (Transcoder Daemon per `urfd`) integrata con il vocoder software **[xombe](https://github.com/x0rro/xombe)** (AMBE+ / AMBE2+) come Git submodule al posto della vecchia libreria `mbe/`.
## Introduction
Supporta la transcodifica cross-mode **D-STAR ↔ DMR / YSF-DN ↔ M17 (Codec2) ↔ P25 (IMBE) ↔ USRP** senza dongle hardware USB DVSI.
This will build a new kind of hybrid transcoder that uses only software for vocoding digital voice streams used in DStar/DMR/YSF/NXDN *and* David Rowe's open-source Codec2 used in M17 as well as the open-source P25 vocoder, IMBE used in P25.
## Requisiti
This is the only transcoder that will work with the [URF reflector](https://github.com/nostar/urfd).
- `g++` (C++17), `make`, `cmake`, `git`
This software is loosely based on LX3JL's **ambed**, but is easily different enough to be considered an entirely original work. Here are some major differences with ambed:
- *TCP Sockets* are used to communicate between the reflector and this transcoder. This guarantees that packets moving between the reflector and transcoder are never lost and the arrive at their destination in order.
- Each configured module has a dedicated encoding and decoding instance running on a different thread. This prevents overloading when processing multiple voice streams and provides the best possible performance for the reflector's clients.
## Constraints and Requirements
Only systemd-based operating systems are supported. Debian or Ubuntu is recommended. If you want to install this on a non-systemd based OS, you are on your own. Also, by default, *tcd* is built without gdb support.
## Download the repository
In the parent directory of you *urfd* repository:
Su Debian / Ubuntu / Raspberry Pi OS:
```bash
git clone https://github.com/nostar/tcd.git
cd tcd
sudo apt update && sudo apt install -y build-essential cmake git
```
To be perfectly clear, the urfd reflector repository clone and this clone **must be in the same directory**. If your transcoder is a remote installation, you still need to `git clone https://github.com/nostar/urfd.git` even though you won't compile anything in the *urfd* repository. Both *tcd* and *urfd* repositories need to be in the same directory as several of the source files in *tcd* are symbolic links to the adjacent *urfd* reflector source code.
## Download e compilazione
## Compiling and configuring *tcd*
Copy the three configuration files to the working directory:
Clona il repository includendo il submodule `xombe`:
```bash
cp config/* .
git clone --recursive https://git.arifvg.it/iv3jdv/tcd-xombe.git
cd tcd-xombe
cp config/tcd.mk .
make -j$(nproc)
```
Use your favorite text editor to edit the following files:
- *tcd.mk* defines some compile time options. Once you've set these options, do `make` to compile *tcd*. If you change `BINDIR`, you need to also change the `ExecStart` in your *tcd.service* file.
Il `Makefile` compila automaticamente `libxombe.a` (solo target libreria) e poi l'eseguibile `tcd`.
- *tcd.ini* defines run-time options. It is especially important that the `Modules` line for the tcd.ini file is exactly the same as the same line in the urfd.ini file! The `ServerAddress` is the url of the server. If the transcoder is local, this is usually `127.0.0.1` or `::1`. If the transcoder is remote, this is the IP address of the server. Suggested values for vocoder gains are provided.
- *tcd.service* is the systemd service file. You will need to modify the `ExecStart` line to successfully start *tcd* by specifying the path to your *tcd* executable and your tcd.ini file.
## Transcoding options
This transcoder is all software with no external library requirements, and no hardware requirements. Since there are no hardware based module restrictions, all 26 modules can be transcoded.
## Installing *tcd* when the transcoder is local
It is easiest to install and uninstall *tcd* using the ./radmin scripts in your urfd repo. If you want to do this manually:
### Pulizia
```bash
sudo make install
sudo make uninstall
make clean # rimuove solo gli oggetti di tcd
make distclean # rimuove anche la build di xombe
```
## Installing *tcd when the transcoder is remote
## Configurazione e installazione
Use:
- `make` to compile *tcd*.
- `sudo make install` to install and run *tcd*.
- `sudo systemctl *something*` is used to manage the running *tcd*, where `*something*` might be `start`, `stop` or other verbs.
- `sudo journalctl -u tcd -f` to monitor the logs.
- `sudo make uninstall` to uninstall *tcd*.
1. Copia e modifica il file di configurazione (assicurandoti che `Port` e `Modules` coincidano con la sezione `[Transcoder]` di `urfd.ini`):
```bash
sudo cp config/tcd.ini /usr/local/etc/tcd.ini
```
*(Con `xombe` i livelli PCM sono già normalizzati: si consiglia di partire con `DStarGainIn = 0` e `DStarGainOut = 0`.)*
When started, *tcd* will establish a TCP connection for each transcoded reflector module. If the TCP connection is lost, *tcd* will block until the connection is reestablished. A message will be printed every 10 seconds suggesting that the reflector needs to be restarted.
2. Installa binario e servizio `systemd`:
```bash
sudo make install
```
3. Verifica lo stato e i log:
```bash
sudo systemctl status tcd
journalctl -u tcd -n 30 --no-pager
```
## Note tecniche
- **Vocoder:** `XombeVocoder` incapsula due coppie di istanze `xombe` indipendenti (D-STAR 2400x1200 e DMR 2450x1150) per permettere l'esecuzione parallela dei thread `ProcessAMBEThread` e `ProcessAMBE2Thread`.
- **Performance su ARM:** l'encoder DMR usa `XOMBE_ENC_QUANT_OPEN` per mantenere la latenza media di transcodifica sotto i 20 ms/frame anche su Raspberry Pi.