资源简介
在语音处理中能够对语音进行自动切分的工具,目前在国内打开官方网站好象有问题,现在把这个SPPAS工具上传。
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (C) 2011-2014 Brigitte Bigi
#
# This file is part of SPPAS.
#
# SPPAS is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation either version 3 of the License or
# (at your option) any later version.
#
# SPPAS is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SPPAS. If not see .
import os
import sys
import getopt
from os.path import *
SPPAS = join(dirname( dirname( abspath(__file__) ) ) “sppas“)
sys.path.append(SPPAS)
try:
from annotationdata.transcription import Transcription
from annotations.Align.align import sppasAlign
import annotationdata.io
except Exceptione:
sys.stderr.write(“SPPAS::tools::alignment.py. Import error: \n“)
sys.stderr.write(str(e)+“\n“)
sys.exit(1)
# ######################################################################### #
# Functions
# ######################################################################### #
def usage(output):
“““ Write the SPPAS/tools/alignment.py usage on an output .
Parameters:
- output is a string representing the output (for example: sys.stdout)
Return: none
Exceptions: none
“““
output.write(‘alignment.py \n‘)
output.write(‘ -w file Input wav file name\n‘)
output.write(‘ -i file Input file name with the phonetization\n‘)
output.write(‘ -I file Input file name with the tokenization\n‘)
output.write(‘ -m file Model directory\n‘)
output.write(‘ -o file Output file name with alignments\n‘)
output.write(‘ Options:\n‘)
output.write(‘ -n value Tier number of the input phonetization (default: 1=first tier)\n‘)
output.write(‘ -N value Tier number of the input tokenization (default: 1=first tier)\n‘)
output.write(‘ -a name Aligner name. One of: julius hvite basic (default: julius)\n‘)
output.write(‘ --unk Override UNK phonetizations\n‘)
output.write(‘ --merge Merge intput and result into output\n‘)
output.write(‘ --extend Extend last phoneme/token to the wav duration [TO DO!]\n‘)
output.write(‘ --help Print this help\n‘)
# End usage
# ----------------------------------------------------------------------
def quit(message status):
“““ Exit this program.
Parameters:
- message is a text to communicate to the user on sys.stderr.
- status is an integer of the status exit value
Re
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1022 2014-05-16 09:52 sppas16\AUTHORS.txt
文件 6331 2014-05-09 08:39 sppas16\bin\alignment.py
文件 7180 2014-03-18 09:28 sppas16\bin\annotation.py
文件 6896 2014-03-18 09:28 sppas16\bin\dataeditor.py
文件 6910 2014-03-18 09:28 sppas16\bin\dataroamer.py
文件 6929 2014-03-18 09:28 sppas16\bin\iputranscriber.py
文件 5813 2014-03-18 09:28 sppas16\bin\momel-intsint.py
文件 5431 2014-03-18 09:28 sppas16\bin\phonetize.py
文件 5672 2014-03-18 09:28 sppas16\bin\phonetizevocab.py
文件 5436 2014-03-18 09:28 sppas16\bin\repetition.py
文件 7582 2014-05-12 10:01 sppas16\bin\sppasgui.py
文件 6611 2014-03-18 09:28 sppas16\bin\stats.py
文件 4810 2014-03-18 09:28 sppas16\bin\syllabify.py
文件 4943 2014-03-18 09:28 sppas16\bin\tokenize.py
文件 6617 2014-03-18 09:28 sppas16\bin\trsfilter.py
文件 6904 2014-03-18 09:28 sppas16\bin\wavpla
文件 4583 2014-03-18 09:28 sppas16\bin\wavslice.py
文件 8462 2014-03-18 09:28 sppas16\bin\wavsplit.py
文件 17123 2014-05-24 20:56 sppas16\CHANGES.txt
文件 996 2014-03-18 09:28 sppas16\COPYLEFT.txt
文件 252745 2014-03-18 09:28 sppas16\COPYRIGHT\COPYRIGHT-EN.pdf
文件 88881 2014-03-18 09:28 sppas16\COPYRIGHT\COPYRIGHT-IT.pdf
文件 151197 2014-03-18 09:28 sppas16\COPYRIGHT\COPYRIGHT-ZH.pdf
文件 35147 2014-03-18 09:28 sppas16\COPYRIGHT\GPL-3.0.EN.txt
文件 44219 2014-03-18 09:28 sppas16\COPYRIGHT\GPL-3.0.ES.txt
文件 46897 2014-03-18 09:28 sppas16\COPYRIGHT\GPL-3.0.FR.txt
文件 115300 2014-05-22 14:01 sppas16\documentation\documentation.html
文件 1220980 2014-05-22 14:01 sppas16\documentation\documentation.pdf
文件 495654 2014-05-22 14:01 sppas16\documentation\etc\figures\alignworkflow.bmp
文件 396954 2014-05-22 14:01 sppas16\documentation\etc\figures\phonworkflow.bmp
............此处省略1155个文件信息
评论
共有 条评论