mirror of
				https://gitlab.com/gpvkt/twitch-irl-docker.git
				synced 2025-10-31 17:17:38 +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', |   'CHAT_HEIGHT', | ||||||
|   'DEBUG', |   'DEBUG', | ||||||
|   'EXTDATA', |   'EXTDATA', | ||||||
|   'TTS' |   'TTS', | ||||||
|  |   'TTS_URL' | ||||||
| ] | ] | ||||||
| 
 | 
 | ||||||
| def get_config(): | def get_config(): | ||||||
|  | @ -87,6 +88,9 @@ def get_config(): | ||||||
|         logging.warning('Debug-Mode is active') |         logging.warning('Debug-Mode is active') | ||||||
|         conf['DEBUG'] = True |         conf['DEBUG'] = True | ||||||
| 
 | 
 | ||||||
|  |     if not conf['TTS_URL']: | ||||||
|  |         conf['TTS_URL'] = "http://localhost/tts" | ||||||
|  | 
 | ||||||
|     if not conf['EXTDATA']: |     if not conf['EXTDATA']: | ||||||
|         conf['EXTDATA'] = False |         conf['EXTDATA'] = False | ||||||
|     else: |     else: | ||||||
|  |  | ||||||
|  | @ -44,6 +44,7 @@ offline_scene = obs_settings.offline_scene | ||||||
| channel = obs_settings.channel | channel = obs_settings.channel | ||||||
| chat_height = obs_settings.chat_height | chat_height = obs_settings.chat_height | ||||||
| tts = obs_settings.tts | tts = obs_settings.tts | ||||||
|  | tts_url = obs_settings.tts_url | ||||||
| 
 | 
 | ||||||
| if not chat_height: | if not chat_height: | ||||||
|     chat_height = int(500) |     chat_height = int(500) | ||||||
|  | @ -116,7 +117,7 @@ if connected: | ||||||
| 
 | 
 | ||||||
|     if tts: |     if tts: | ||||||
|         print('<div id="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 class="status" onClick="$(\'#ttsframe\').fadeToggle(\'slow\', \'linear\');">Show/Hide chat</div>') | ||||||
|         print('</div>') |         print('</div>') | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -14,3 +14,4 @@ debug = os.environ.get('DEBUG', False) | ||||||
| chat_height = os.environ.get('CHAT_HEIGHT', 500) | chat_height = os.environ.get('CHAT_HEIGHT', 500) | ||||||
| extdata = os.environ.get('EXTDATA', False) | extdata = os.environ.get('EXTDATA', False) | ||||||
| tts = os.environ.get('TTS', 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