Skip to content

Commit

Permalink
Removed dependence on libsndfile, which complicated compiling on Wind…
Browse files Browse the repository at this point in the history
…ows and confused some people who thought using sonic requires this library. Also changed from .flac format to wav file format for samples
  • Loading branch information
Bill Cox committed Oct 21, 2011
1 parent 1a15418 commit ec23ae0
Show file tree
Hide file tree
Showing 22 changed files with 313 additions and 65 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
# safe. We call malloc, and older Linux versions only linked in the thread-safe
# malloc if -pthread is specified.

#CFLAGS=-Wall -g -ansi -fPIC -pthread
CFLAGS=-Wall -O2 -ansi -fPIC -pthread
CFLAGS=-Wall -g -ansi -fPIC -pthread
#CFLAGS=-Wall -O2 -ansi -fPIC -pthread
LIB_TAG=0.1.18
CC=gcc
PREFIX=/usr

all: sonic libsonic.so.$(LIB_TAG) libsonic-$(LIB_TAG).a

sonic: wave.o main.o libsonic.so.$(LIB_TAG)
$(CC) $(CFLAGS) -lsndfile libsonic.so.$(LIB_TAG) -o sonic wave.o main.o
$(CC) $(CFLAGS) libsonic.so.$(LIB_TAG) -o sonic wave.o main.o

sonic.o: sonic.c sonic.h
$(CC) $(CFLAGS) -c sonic.c
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: sonic
Section: sound
Priority: extra
Maintainer: Bill Cox <waywardgeek@gmail.com>
Build-Depends: libsndfile1-dev, debhelper (>= 7.0.50~)
Build-Depends: debhelper (>= 7.0.50~)
Standards-Version: 3.9.1
Homepage: http://vinux-project.org/sonic
Vcs-Browser: http://vinux-project.org/gitweb/?p=sonic.git;a=summary
Expand Down
6 changes: 0 additions & 6 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ int main(
int sampleRate, numChannels;
int xArg = 1;

if(argc < 2 || *(argv[xArg]) != '-') {
fprintf(stderr, "You must provide at least one option to change speed,"
"pitch, or volume.\n");
usage();
return 1;
}
while(xArg < argc && *(argv[xArg]) == '-') {
if(!strcmp(argv[xArg], "-c")) {
emulateChordPitch = 1;
Expand Down
25 changes: 12 additions & 13 deletions samples/README
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
These flac files show how Sonic performs at increasing speech rates. All sound
sampels are in the public domain. The 'flac' lossless compression utilitiy was
used to reduce the size of the wave files.
These wav files show how Sonic performs at increasing speech rates. All sound
sampels are in the public domain.

sonic.flac
sonic.wav
This is a sonic 2X sped-up version of a public domain librivox.org recording, from
the audiobook "Princess of Mars".

soundtouch.flac
This is the same recording as sonic.flac, but sped up using soundtouch, which
soundtouch.wav
This is the same recording as sonic.wav, but sped up using soundtouch, which
uses WSOLA rather than the sonic algorithm. Even at 2X speed up, you should be
able to hear the characteristic WSOLA distortion relative to the sonic version.

talking.flac
talking.wav
This is my father talking, using a decent microphone and 44KHz sample rate.

talking_2x.flac
talking_2x.wav
This is his voice sped up by 2X using Sonic.

espeak_s450.flac
espeak_s450.wav
Sonic also performs well at increasing the speed of synthesized speech.
espeak_s450.flac was generated using 'espeak -s450 -f test1.txt -w
espeak_s450.flac'. This is the highest speed currently supported by espeak,
espeak_s450.wav was generated using 'espeak -s450 -f test1.txt -w
espeak_s450.wav'. This is the highest speed currently supported by espeak,
though Sonic can speed up espeak to much faster rates.

espeak_sonic.flac
espeak_sonic.wav
This was generated with 'espeak -f test1.txt -w out.wav;
sonic 2.6 out.wav espeak_sonic.wav'. Sonic sped it up 2.6X, which is about the
same speed as espeak at -s450. I personally feel that the sonic sped up sample
sounds better than espeak at -s450.

twosineperiods.flac
twosineperiods.wav
This is just two sine periods, which is too short to hear. However, it's
useful for making sure the flush function works correctly. A 2-X speedup should
result in one sine period with no distortion.
Binary file removed samples/espeak_s450.flac
Binary file not shown.
Binary file added samples/espeak_s450.wav
Binary file not shown.
Binary file removed samples/espeak_sonic.flac
Binary file not shown.
Binary file added samples/espeak_sonic.wav
Binary file not shown.
Binary file removed samples/sonic.flac
Binary file not shown.
Binary file added samples/sonic.wav
Binary file not shown.
Binary file removed samples/soundstretch.flac
Binary file not shown.
Binary file added samples/soundstretch.wav
Binary file not shown.
Binary file removed samples/stereo_test.flac
Binary file not shown.
Binary file added samples/stereo_test.wav
Binary file not shown.
Binary file removed samples/talking.flac
Binary file not shown.
Binary file added samples/talking.wav
Binary file not shown.
Binary file removed samples/talking_2x.flac
Binary file not shown.
Binary file added samples/talking_2x.wav
Binary file not shown.
Binary file removed samples/twosineperiods.flac
Binary file not shown.
Binary file added samples/twosineperiods.wav
Binary file not shown.
Loading

0 comments on commit ec23ae0

Please sign in to comment.