New port: audio/libsonic: Simple library to speed up or slow down speech

This commit is contained in:
Yuri Victorovich 2018-07-04 02:41:30 +00:00
parent 0d5fe192af
commit cb2a9ccd7f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473863
5 changed files with 75 additions and 0 deletions

View File

@ -441,6 +441,7 @@
SUBDIR += libsidplayfp
SUBDIR += libsmf
SUBDIR += libsndfile
SUBDIR += libsonic
SUBDIR += libsoxr
SUBDIR += libtremor
SUBDIR += libumidi

32
audio/libsonic/Makefile Normal file
View File

@ -0,0 +1,32 @@
# $FreeBSD$
PORTNAME= libsonic
DISTVERSIONPREFIX= release-
DISTVERSION= 0.2.0-51
DISTVERSIONSUFFIX= -ge4a56ec
CATEGORIES= audio
MAINTAINER= yuri@FreeBSD.org
COMMENT= Simple library to speed up or slow down speech
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libfftw3.so:math/fftw3
USES= gmake localbase:ldflags
USE_GITHUB= yes
GH_ACCOUNT= waywardgeek
GH_PROJECT= sonic
USE_LDCONFIG= yes
MAKE_ARGS= CC=${CC} CFLAGS="${CFLAGS}" PREFIX="${PREFIX}"
CFLAGS+= -ansi -fPIC -pthread -Wno-unused-function -DSONIC_SPECTROGRAM
PLIST_FILES= bin/sonic \
include/sonic.h \
lib/libsonic.so \
lib/libsonic.so.0 \
lib/libsonic.so.0.3.0
.include <bsd.port.mk>

3
audio/libsonic/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1530670250
SHA256 (waywardgeek-sonic-release-0.2.0-51-ge4a56ec_GH0.tar.gz) = 0e0c74a9722225343f5a69df5f213a43b32ed71113ef8e169a7477681989a669
SIZE (waywardgeek-sonic-release-0.2.0-51-ge4a56ec_GH0.tar.gz) = 5349382

View File

@ -0,0 +1,28 @@
--- Makefile.orig 2018-07-03 15:11:47 UTC
+++ Makefile
@@ -32,7 +32,7 @@ OBJ=$(SRC:.c=.o)
all: sonic libsonic.so.$(LIB_TAG) libsonic.a
sonic: wave.o main.o libsonic.a
- $(CC) $(CFLAGS) -o sonic wave.o main.o libsonic.a -lm $(FFTLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o sonic wave.o main.o libsonic.a -lm $(FFTLIB)
sonic.o: sonic.c sonic.h
$(CC) $(CFLAGS) -c sonic.c
@@ -47,7 +47,7 @@ spectrogram.o: spectrogram.c sonic.h
$(CC) $(CFLAGS) -c spectrogram.c
libsonic.so.$(LIB_TAG): $(OBJ)
- $(CC) $(CFLAGS) -shared -Wl,-$(SONAME),libsonic.so.0 $(OBJ) -o libsonic.so.$(LIB_TAG) $(FFTLIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-$(SONAME),libsonic.so.0 $(OBJ) -o libsonic.so.$(LIB_TAG) $(FFTLIB)
ln -sf libsonic.so.$(LIB_TAG) libsonic.so
ln -sf libsonic.so.$(LIB_TAG) libsonic.so.0
@@ -59,7 +59,6 @@ install: sonic libsonic.so.$(LIB_TAG) so
install sonic $(DESTDIR)$(PREFIX)/bin
install sonic.h $(DESTDIR)$(PREFIX)/include
install libsonic.so.$(LIB_TAG) $(DESTDIR)$(PREFIX)/lib
- install libsonic.a $(DESTDIR)$(LIBDIR)
ln -sf libsonic.so.$(LIB_TAG) $(DESTDIR)$(PREFIX)/lib/libsonic.so
ln -sf libsonic.so.$(LIB_TAG) $(DESTDIR)$(PREFIX)/lib/libsonic.so.0

11
audio/libsonic/pkg-descr Normal file
View File

@ -0,0 +1,11 @@
Sonic is a simple algorithm for speeding up or slowing down speech. However,
it's optimized for speed ups of over 2X, unlike previous algorithms for changing
speech rate. The Sonic library is a very simple ANSI C library that is designed
to easily be integrated into streaming voice applications, like TTS back ends.
The primary motivation behind Sonic is to enable the blind and visually impaired
to improve their productivity with open source speech engines, like espeak.
Sonic can also be used by the sighted. For example, Sonic can improve the
experience of listening to an audio book on an Android phone.
WWW: https://github.com/waywardgeek/sonic