User Tools

Site Tools


select-option

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
select-option [2021/10/25 16:47] – created adminselect-option [2023/04/23 15:52] (current) admin
Line 1: Line 1:
-<code>+This is all from /usr/lib/cgi-bin/ and /var/www/html/mp3 on Jim-ITX (.45) 
 +<Code>
     $.post("/cgi-bin/t.py",     $.post("/cgi-bin/t.py",
         {         {
Line 22: Line 23:
         });         });
  
-</code>+</Code> 
 +The result comes back as a object: 
 +{{::voices.png|}} 
 + 
 +t.py code to generate the "result" 
 + 
 +<Code> 
 +    if action == "getvoices": 
 +        voices = text_to_speech.list_voices().get_result() 
 +        v = voices['voices'
 +        persons = {} 
 +        for x in v: 
 +            name=x['name'
 +            description = x['description'
 +            language = x['language'
 +            if language.startswith('en',0):  
 +                nam = re.split(":",description) 
 +                persons[nam[0]]=name 
 +        jo = json.dumps(persons) 
 +        print(jo) 
 +</Code>
select-option.1635173279.txt.gz · Last modified: 2021/10/25 16:47 by admin