|
@@ -535,10 +535,7 @@ def video_writer_init(path):
|
|
|
|
|
|
def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
|
|
|
file_prepare_long(name, name_hash, text_content,image_urls,multiLang)
|
|
|
- print(text_content)
|
|
|
- tct = ['{1}集仕多具豐富深度學習、數據分析經驗。{2}公司成立一年,已拿到許多付費簽約客戶,以及公部門的合作專案。{3}團隊成員研發實力優異,本身就掌握AI深度學習技術,利用核心技術研發產品,樹立進入門檻、降低競爭威脅{4}本計畫預計研發智能自動撰寫文稿技術,結合現行開發的智能虛擬主播自動影片製作,目標研發可以自動產製數位內容的軟體服務。將產品應用於數位電子看板領域。{5}在此計畫中研發類比大廠的技術抓取外部系統文章,做自動摘要、標題生成、內容生成以及內容強化等步驟。自動產出文章。{6}結合能根據旁白腳本,用多國語言介紹內容的,智能虛擬主播自動產生影片功能。{7}強大功能包含,具新聞播報的專業說服力,支援多元素素材檔案,可短時間內大量生成影片,彈性高可快速部屬行銷應用。{8}系統的軟體架構類似亞馬遜智慧音箱,提供用戶應用服務,用在智能無人電視台。 隨數位顯示器感知到客群與環境變化,去調整電視節目的順序與內容。{9}智慧內容電視台能在無人情況下自動營運,促成智慧顯示器生態系,創新廣告模式新商機。{10}有助改善數位看板維護內容、更新成本高的現況。促進商家導入數位看板做營銷佈局。{11}對使用業者的三大好處。一、從遠端管理中心控制各地的數百個顯示器。二、自動編輯生成內容。三、即時安排播放影音介紹。{12}場域驗證上,我們規劃與工業電腦、數位電子看板系統整合廠商洽談合作可能性。提供服務給其下的產業客戶使用,用互惠專案切入市場合作的開端。{13}預計適合應用場域有,零售業、餐飲業、飯店旅館、醫療院所、公共場所等等。{14}我們希望用軟體實力結合台灣電子硬體優勢共創物聯網應用大未來。']
|
|
|
-
|
|
|
- print(tct)
|
|
|
+
|
|
|
for fname in range(len(text_content)):
|
|
|
call_anchor(name_hash+"/"+str(fname),avatar)
|
|
|
print('called............................................')
|
|
@@ -662,18 +659,9 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
|
|
|
|
|
|
tp = parser()
|
|
|
img_dict_ls = tp.image_clip_info(sub_dict)
|
|
|
- #if 'image_idx' in dic:
|
|
|
- # new_dic['image_obj'] = {'start':dic['start'],'idx':dic['image_idx']}
|
|
|
img_clip_list = [None]*len(listdir(dir_photo+name_hash))
|
|
|
img_list = [None]*len(img_clip_list)
|
|
|
- #for p in listdir(dir_photo+name_hash):
|
|
|
- # p_idx = int(p)-1
|
|
|
- # img_list[p_idx] = openshot.FFmpegReader(dir_photo+name_hash+'/'+p)
|
|
|
- # img_list[p_idx].Open()
|
|
|
- # img_clip_list[p_idx] = video_photo_clip(vid=img_list[p_idx],layer=3
|
|
|
- # ,scale_x=0.81,scale_y=0.68,location_y=-0.03,position=img_dict_ls[int(p)+1]['start'],end=img_dict_ls[int(p)+1]['duration'],audio=False)
|
|
|
- # t.AddClip(img_clip_list[p_idx])
|
|
|
- # img_list[p_idx].Close()
|
|
|
+
|
|
|
img_file_ls = listdir(dir_photo+name_hash)
|
|
|
print(img_file_ls)
|
|
|
print(img_dict_ls)
|
|
@@ -700,6 +688,10 @@ def video_gen(name_hash,name,text_content, image_urls,multiLang,avatar):
|
|
|
w.WriteFrame(f)
|
|
|
t.Close()
|
|
|
w.Close()
|
|
|
+ path = tmp_video_dir+name_hash+"script.txt"
|
|
|
+ f = open(path, 'r')
|
|
|
+ print(f.read())
|
|
|
+ f.close()
|
|
|
os.remove(tmp_video_dir+name_hash+"raw.mp4")
|
|
|
os.remove(tmp_video_dir+name_hash+"script.txt")
|
|
|
print(name+"ALL DONE : www.choozmo.com:8168/"+video_sub_folder+name_hash+"raw.mp4")
|
|
@@ -987,6 +979,7 @@ def anchor_video_eng(name_hash,name,text_content, image_urls,sub_titles,avatar):
|
|
|
t.Close()
|
|
|
w.Close()
|
|
|
print("video at : www.choozmo.com:8168/"+video_sub_folder+name_hash+".mp4")
|
|
|
+
|
|
|
#line notifs
|
|
|
|
|
|
import pyttsx3
|