#!/usr/bin/python3
from tts_arranger import TTS_Item, TTS_Chapter, TTS_Project, TTS_Writer

items1 = []
items1.append(TTS_Item('This is a test:', speaker_idx=0))
items1.append(TTS_Item('This is another test:',  speaker_idx=1))

items2 = []
items2.append(TTS_Item('Another test',  speaker_idx=0))
items2.append(TTS_Item('This is getting boring!',  speaker_idx=1))

chapter = []
chapter.append(TTS_Chapter(items1, 'Chapter 1'))
chapter.append(TTS_Chapter(items2, 'Chapter 2'))

project = TTS_Project(chapter, 'Project title', 'This is a subtitle', author='Some author')

writer = TTS_Writer(project, '/tmp/test_m4b')
writer.synthesize_and_write(project.author + ' - ' + project.title)