[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging with Develop #23

Merged
merged 38 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
fac9aed
remove auto-tag
b00f Sep 24, 2018
8a9b530
remove windows support
b00f Sep 24, 2018
707cb5e
remove windows support
b00f Sep 24, 2018
aff131b
remove test from makefile
b00f Sep 24, 2018
b0a604c
move tihu to src
b00f Sep 25, 2018
787e778
update makeile
b00f Sep 25, 2018
003af4a
fix header defs
b00f Sep 26, 2018
e229f16
update settings
b00f Sep 26, 2018
e74935d
Update settings
b00f Sep 27, 2018
ac38017
report corpus as a text message after parsing text
b00f Sep 28, 2018
93b198e
add word tokenizer
b00f Oct 1, 2018
2301832
Update tools
b00f Oct 2, 2018
40b5c61
Make corpus module
b00f Oct 4, 2018
580f87e
Update tests
b00f Oct 4, 2018
35bf32a
move utf-8 folder into src folder
b00f Oct 10, 2018
11fb6b2
A word can have more than one entry
b00f Oct 11, 2018
5ffdf8b
Using tihu tokenizer to pars the text
b00f Oct 12, 2018
40c806d
fix some issues on looking up word
b00f Oct 12, 2018
60ec0c5
Update tests
b00f Oct 21, 2018
5e0a149
Load all synthesizer at the beginning
b00f Oct 26, 2018
fa6660c
update tests
b00f Oct 26, 2018
7941909
Fix travis error
b00f Oct 26, 2018
b47d39a
Update README.md
b00f Oct 26, 2018
9eb9323
Update tihu.cpp
b00f Mar 7, 2019
c0b06a2
Add grpc server
b00f Mar 10, 2019
e271abe
Merge pull request #13 from tihu-nlp/grpc
b00f Mar 10, 2019
3a9fd0b
Fix tihu_play issue
b00f Mar 11, 2019
a965c05
fix ci error
b00f Mar 11, 2019
9119f0f
Merge pull request #16 from tihu-nlp/fix-ci
b00f Mar 11, 2019
3df5c70
Merge pull request #17 from tihu-nlp/tihu-play
b00f Mar 11, 2019
062d295
fix tihu_console issue
b00f Mar 12, 2019
fc46491
Merge pull request #18 from tihu-nlp/tihu_console
b00f Mar 12, 2019
a1be80f
Update callbacks
b00f Mar 12, 2019
3982a05
Add version to proto
b00f Mar 12, 2019
1ff023f
Add grpc and protoc
b00f Mar 13, 2019
5ca3e9a
Merge pull request #22 from tihu-nlp/fix-ci
b00f Mar 13, 2019
e59cda1
bumping version to 0.2.0
b00f Mar 14, 2019
426e28c
Merge pull request #21 from tihu-nlp/grpc
b00f Mar 14, 2019
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
Next Next commit
remove auto-tag
  • Loading branch information
b00f committed Oct 26, 2018
commit fac9aedfbd985ebb5f5b0756f7b571c90f5c22d9
62 changes: 14 additions & 48 deletions tihu/Makefile
Original file line number Diff line number Diff line change
@@ -1,66 +1,29 @@
LIBNAME = tihu
TARGET=lib$(LIBNAME).so
TARGET_TEST=$(LIBNAME)_test
CC = g++

INC = `python2.7-config --includes` -I. -Xlinker -export-dynamic
CXXFLAGS = -c -fPIC -Wall -std=c++14 $(INC) -O3 -g
SRCS = $(wildcard *.cpp) $(wildcard */*.cpp) $(wildcard */*/*.cpp)
OBJS = $(addprefix obj/,$(patsubst %.cpp,%.o,$(SRCS)))
OBJDIRS = $(dir $(OBJS))
INC = `python2.7-config --includes` -I. -Xlinker -export-dynamic
## for debugging
##CXXFLAGS = -c -Wall -std=c++14 $(INC) -DDEBUG -g -fPIC
LDFLAGS = `python2.7-config --ldflags` -shared -Wl,-soname,$(TARGET) -o $(TARGET)
CXXFLAGS = -c -Wall -std=c++14 $(INC) -DDEBUG -g -fPIC
#CXXFLAGS = -c -fPIC -Wall -std=c++14 $(INC) -O3 -g
LDFLAGS = `python2.7-config --ldflags` -shared -Wl,-soname,$(TARGET) -o $(TARGET)
LIBS =
RM = rm -f

SRCS= \
ipa_transcript/tihu_dict/afx_manager.cpp \
ipa_transcript/tihu_dict/afx_entry.cpp \
ipa_transcript/tihu_dict/hash_manager.cpp \
ipa_transcript/tihu_dict/pfx_entry.cpp \
ipa_transcript/tihu_dict/sfx_entry.cpp \
ipa_transcript/tihu_dict/tihu_dict.cpp \
ipa_transcript/letter_to_sound/persian_to_phoneme.cpp \
ipa_transcript/letter_to_sound/english_to_phoneme.cpp \
ipa_transcript/letter_to_sound/punctuation_to_phoneme.cpp \
ipa_transcript/letter_to_sound/number_to_phoneme.cpp \
ipa_transcript/letter_to_sound/letter_to_sound.cpp \
ipa_transcript/letter_to_sound/g2p_seq2seq_linux.cpp \
synthesis/espeak/espeak_lib.cpp \
synthesis/espeak/espeak_syn.cpp \
synthesis/mbrola/mbrola_lib.cpp \
synthesis/mbrola/mbrola_syn.cpp \
synthesis/mbrola/mbrowrap.cpp \
hazm/hazm.cpp \
text_tagger.cpp \
corpus.cpp \
event.cpp \
phoneme.cpp \
pitch_range.cpp \
word.cpp \
tihu.cpp \
parser.cpp \
engine.cpp \
settings.cpp \
synthesizer.cpp \
helper.cpp \
hunzip.cpp \
file_manager.cpp

OBJS = $(SRCS:.cpp=.o)


.PHONY: all
all: $(TARGET) install

$(TARGET): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

.cpp.o:
$(CC) $(CXXFLAGS) $< -o $@
obj/%.o: %.cpp
@mkdir -p $(@D)
$(CC) $(CXXFLAGS) -c $< -o $@

.PHONY: clean
clean:
-$(RM) $(TARGET) $(OBJS) $(TARGET_TEST)

rm -rf ./obj

install:
cp $(TARGET) ../build/
Expand All @@ -71,3 +34,6 @@ test: $(TARGET_TEST)

$(TARGET_TEST): $(TARGET)
$(CC) $(TARGET_TEST).cpp -o $@ -L. -ldl

# to print variables in makefile
print-% : ; @echo $* = $($*)
12 changes: 0 additions & 12 deletions tihu/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "synthesis/mbrola/mbrola_syn.h"
#include "synthesis/espeak/espeak_syn.h"
#include "hazm/hazm.h"
#include "text_tagger.h"
#include "engine.h"
#include "tihu.h"

Expand All @@ -49,7 +48,6 @@ CEngine::CEngine()
TihuDict = nullptr;
LetterToSound = nullptr;
Synthesizer = nullptr;
TextTagger = nullptr;
Corpus = new CCorpus();
}

Expand All @@ -67,9 +65,6 @@ CEngine::~CEngine()
if(Synthesizer) {
delete Synthesizer;
}
if(TextTagger) {
delete TextTagger;
}
delete Corpus;
}

Expand All @@ -85,7 +80,6 @@ int CEngine::LoadModules()
Hazm = new CHazm();
TihuDict = new CTihuDict();
LetterToSound = new CLetterToSound();
TextTagger = new CTextTagger();

if (!static_cast<CHazm*>(Hazm)->Load("Hazm")) {
return TIHU_ERROR_LOAD_DATA;
Expand Down Expand Up @@ -148,7 +142,6 @@ void CEngine::SetCallback(TIHU_CALLBACK callback, void* userData)
(TihuDict) ? TihuDict->SetCallBack(callback, userData) : void();
(LetterToSound) ? LetterToSound->SetCallBack(callback, userData) : void();
(Synthesizer) ? Synthesizer->SetCallBack(callback, userData) : void();
(TextTagger) ? TextTagger->SetCallBack(callback, userData) : void();
}

void CEngine::Stop()
Expand Down Expand Up @@ -180,11 +173,6 @@ void CEngine::Diacritize(const std::string &text)

}

void CEngine::AutoTag(const std::string &text)
{

}

bool CEngine::SetParam(TIHU_PARAM param, int value)
{
bool applied = true;
Expand Down
2 changes: 0 additions & 2 deletions tihu/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class CEngine

void Speak(const std::string &text);
void Diacritize(const std::string &text); //TODO:
void AutoTag(const std::string &text); //TODO:

void Dump(const std::string &filename);
void Stop();
Expand All @@ -65,7 +64,6 @@ class CEngine
IParser* Hazm;
IParser* TihuDict;
IParser* LetterToSound;
IParser* TextTagger;

ISynthesizer* Synthesizer;

Expand Down
7 changes: 1 addition & 6 deletions tihu/ipa_transcript/letter_to_sound/english_to_phoneme.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
#include "helper.h"

#include <map>

#ifdef WIN32
#include "g2p_seq2seq_windows.h"
#else
#include "g2p_seq2seq_linux.h"
#endif
#include "g2p_seq2seq.h"

class CEnglishToPhoneme
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
* Mostafa Sedaghat Joo (mostafa.sedaghat@gmail.com)
*
*******************************************************************************/
#include "g2p_seq2seq_linux.h"
//#include "path_manager.h"
#include "g2p_seq2seq.h"


#include <unistd.h>
Expand Down
49 changes: 0 additions & 49 deletions tihu/ipa_transcript/letter_to_sound/g2p_seq2seq_windows.cpp

This file was deleted.

42 changes: 0 additions & 42 deletions tihu/ipa_transcript/letter_to_sound/g2p_seq2seq_windows.h

This file was deleted.

7 changes: 1 addition & 6 deletions tihu/ipa_transcript/letter_to_sound/persian_to_phoneme.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
#include "helper.h"

#include <map>

#ifdef WIN32
#include "g2p_seq2seq_windows.h"
#else
#include "g2p_seq2seq_linux.h"
#endif
#include "g2p_seq2seq.h"

class CPersianToPhoneme
{
Expand Down
86 changes: 0 additions & 86 deletions tihu/text_tagger.cpp

This file was deleted.

Loading