mirror of
				https://gitlab.com/gpvkt/twitch-irl-docker.git
				synced 2025-10-31 00:57:37 +01:00 
			
		
		
		
	Added config option for TTS_URL
This commit is contained in:
		
							parent
							
								
									727d7e8a6b
								
							
						
					
					
						commit
						9126f1518b
					
				
					 3 changed files with 8 additions and 2 deletions
				
			
		|  | @ -60,7 +60,8 @@ vars = [ | |||
|   'CHAT_HEIGHT', | ||||
|   'DEBUG', | ||||
|   'EXTDATA', | ||||
|   'TTS' | ||||
|   'TTS', | ||||
|   'TTS_URL' | ||||
| ] | ||||
| 
 | ||||
| def get_config(): | ||||
|  | @ -87,6 +88,9 @@ def get_config(): | |||
|         logging.warning('Debug-Mode is active') | ||||
|         conf['DEBUG'] = True | ||||
| 
 | ||||
|     if not conf['TTS_URL']: | ||||
|         conf['TTS_URL'] = "http://localhost/tts" | ||||
| 
 | ||||
|     if not conf['EXTDATA']: | ||||
|         conf['EXTDATA'] = False | ||||
|     else: | ||||
|  |  | |||
|  | @ -44,6 +44,7 @@ offline_scene = obs_settings.offline_scene | |||
| channel = obs_settings.channel | ||||
| chat_height = obs_settings.chat_height | ||||
| tts = obs_settings.tts | ||||
| tts_url = obs_settings.tts_url | ||||
| 
 | ||||
| if not chat_height: | ||||
|     chat_height = int(500) | ||||
|  | @ -116,7 +117,7 @@ if connected: | |||
| 
 | ||||
|     if tts: | ||||
|         print('<div id="tts">') | ||||
|         print('    <iframe id="ttsframe" style="display:none;" scrolling="0" frameborder="0" src="/tts" height="500px" width="100%"></iframe>') | ||||
|         print('    <iframe id="ttsframe" style="display:none;" scrolling="0" frameborder="0" src="{0]" height="500px" width="100%"></iframe>'.format(str(tts_url))) | ||||
|         print('    <div class="status" onClick="$(\'#ttsframe\').fadeToggle(\'slow\', \'linear\');">Show/Hide chat</div>') | ||||
|         print('</div>') | ||||
| 
 | ||||
|  |  | |||
|  | @ -14,3 +14,4 @@ debug = os.environ.get('DEBUG', False) | |||
| chat_height = os.environ.get('CHAT_HEIGHT', 500) | ||||
| extdata = os.environ.get('EXTDATA', False) | ||||
| tts = os.environ.get('TTS', False) | ||||
| tts_url = os.environ.get('TTS_URL', 'http://localhost/tts') | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue