标签:
剧情提要:这次要研究的是[汉语的拼音]。
星历2016年05月09日 16:16:57, 银河系厄尔斯星球中华帝国江南行省。
[工程师阿伟]正在和[机器小伟]一起研究[汉语的拼音]。
#生成声波数据 def tmp2_2(): print('生成波形开始。>>>'); fout= open('output.txt', 'w'); #普通话元音,浊辅音 frequence = [[1000,1400,2400], #a [1100,1550,2600], #a(女) [600,1000,2000], #o [900,1300,3000], #o(女) [600,1400,2400], #e [700,1450,3200], #e(女) [650,2050,2600], #e^ [550,2400,3000], #e^(女) [400,2300,3500], #i [350,2900,3500], #i(女) [400, 700], #u [350, 650], #u(女) [450, 2200, 2500],#yu [350, 2300, 2750],#yu(女) [500, 1500, 2600],#i(兹) [500,1500,3100], #i(兹)(女) [450, 1700, 2400],#i(知) [450, 1900, 2600],#i(知)(女) [600, 1500, 2000],#er [750, 1750, 3600],#er(女) #普通话浊辅音 [550, 1800, 2650], #r [300, 1200, 2350], #m [400, 1500, 2400], #n [380, 1000, 1800], #-n [400, 1000, 1900], #-ng [350, 1500, 2400], #l [300, 2200, 3500], #y(i) [300, 600], #w(u) [350, 2400, 3600] #yu ]; size = len(frequence); for i in range(size): dataStr = ''; size_1 = len(frequence[i]); if (size_1 == 2): dataStr = 'primaryTone_'+ str(frequence[i][0])+'_'+str(frequence[i][1]) + ' = ['; elif (size_1 == 3): dataStr = 'primaryTone_'+ str(frequence[i][0])+'_'+str(frequence[i][1]) +'_'+str(frequence[i][2])+ ' = ['; fout.write(dataStr); data = []; if (size_1 == 2): data = waveDataGen_2(frequence[i][0], frequence[i][1], 0); elif (size_1 == 3): data = waveDataGen_2(frequence[i][0], frequence[i][1], frequence[i][2]); size_1 = len(data); for n in range(size_1): fout.write(str(data[n])); if (n < size_1-1): fout.write(', '); fout.write('];'); fout.write('\r\n'); fout.close(); print('生成波形结束,请到output.txt查收。'); #生成声波数据 def tmp3_2(): filename = []; #普通话元音,浊辅音 frequence = [[1000,1400,2400], #a [1100,1550,2600], #a(女) [600,1000,2000], #o [900,1300,3000], #o(女) [600,1400,2400], #e [700,1450,3200], #e(女) [650,2050,2600], #e^ [550,2400,3000], #e^(女) [400,2300,3500], #i [350,2900,3500], #i(女) [400, 700], #u [350, 650], #u(女) [450, 2200, 2500],#yu [350, 2300, 2750],#yu(女) [500, 1500, 2600],#i(兹) [500,1500,3100], #i(兹)(女) [450, 1700, 2400],#i(知) [450, 1900, 2600],#i(知)(女) [600, 1500, 2000],#er [750, 1750, 3600],#er(女) #普通话浊辅音 [550, 1800, 2650], #r [300, 1200, 2350], #m [400, 1500, 2400], #n [380, 1000, 1800], #-n [400, 1000, 1900], #-ng [350, 1500, 2400], #l [300, 2200, 3500], #y(i) [300, 600], #w(u) [350, 2400, 3600] #yu ]; size = len(frequence); for i in range(size): dataStr = ''; size_1 = len(frequence[i]); if (size_1 == 2): dataStr = 'primaryTone_'+ str(frequence[i][0])+'_'+str(frequence[i][1]); elif (size_1 == 3): dataStr = 'primaryTone_'+ str(frequence[i][0])+'_'+str(frequence[i][1])+'_'+str(frequence[i][2]); filename.append(dataStr); print(filename);
f
#生成声波数据 def tmp2(): print('生成波形开始。>>>'); fout= open('output.txt', 'w'); frequence = list(range(100, 7100, 100)); size = len(frequence); for i in range(size): dataStr = 'assistFreq_'+str(frequence[i]).replace('.', 'p') + ' = ['; fout.write(dataStr); data = waveDataGen(frequence[i]); size_1 = len(data); for n in range(size_1): fout.write(str(data[n])); if (n < size_1-1): fout.write(', '); fout.write('];'); fout.write('\r\n'); fout.close(); print('生成波形结束,请到output.txt查收。'); #打印文件名 def tmp3(): filename = []; frequence = list(range(100, 7100, 100)); size = len(frequence); for i in range(size): dataStr = 'assistFreq_'+str(frequence[i]).replace('.', 'p'); filename.append(dataStr); print(filename);
汉语拼音辅音发音
本节到此结束,欲知后事如何,请看下回分解。
标签:
原文地址:http://blog.csdn.net/mwsister/article/details/51354128