Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Apply fixes from https://contest.com/voip-contest/entry1012 #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions bin/other_raters/entry1012/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ CPPFLAGS_RATE += -DRANDOM_PREFIX=tgvoiprate -DOUTSIDE_SPEEX -DRESAMPLE_FULL_SINC

# For debian systems, actually build libopusenc library, too
LIBOPUSENC = /usr/include/opus/opusenc.h /usr/lib/libopusenc.so
LIBOPUSENCREPO = libopusenc
LIBTGVOIPREPO = libtgvoip

CMUTGZ = cmuclmtk-0.7.tar.gz
CMUCLMTK = /usr/bin/wfreq2vocab
Expand All @@ -67,16 +69,22 @@ ${CMUTGZ}:
${CMUCLMTK}: | ${CMUTGZ}
tar -xzf cmuclmtk-0.7.tar.gz && cd cmuclmtk-0.7 && autoreconf -vfi && mkdir -p build && cd build && ../configure --prefix=/usr && make -j$(nproc) && sudo make install && cd ../..

${LIBOPUSENC}:
${LIBOPUSENCREPO}:
git clone https://github.com/xiph/libopusenc

${LIBOPUSENC}: | ${LIBOPUSENCREPO}
cd libopusenc && autoreconf -vfi && mkdir -p build && cd build && ../configure --prefix=/usr && make -j$(nproc) && sudo make install && cd ../..

${TGVOIP}:
${LIBTGVOIPREPO}:
git clone https://github.com/telegramdesktop/libtgvoip -b unstable-2.6

${TGVOIP}: | ${LIBTGVOIPREPO}
cd libtgvoip && autoreconf -vfi && mkdir -p build && cd build && ../configure --enable-production-logging --enable-audio-callback --prefix=/usr && make -j$(shell nproc) && sudo make install && cd ../..

${TGVOIPCALL}: ${TGVOIP} ${OBJECTS_CALL}
${CXX} -o $@ ${OBJECTS_CALL} ${LFLAGS_CALL}

${TGVOIPRATE}: ${OBJECTS_RATE}
${TGVOIPRATE}: ${OBJECTS_RATE} ${CMUCLMTK}
${CXX} -std=c++17 -o $@ ${OBJECTS_RATE} ${LFLAGS_RATE}

${FIXTRANSCRIPT}: ${OBJECT_TRANSCRIPT}
Expand Down
4 changes: 2 additions & 2 deletions bin/other_raters/entry1012/src/rater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ double Rater::finalRateWeight()
{
final = std::max(final - 1.25, 0.0);
}

return final;
return ((final / 5.0) * 4.0) + 1.0;
}
void Rater::resample(int16_t *in, int16_t *out)
{
Expand Down
Binary file modified bin/other_raters/entry1012/tgvoiprate
Binary file not shown.