using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using IronPython.Hosting;
using Microsoft.Scripting;
using Microsoft.Scripting.Hosting;
namespace Text_2_Speech
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Exit_Button_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void Reduire_Button_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Minimized;
}
private void StartToSpeechButton_Click(object sender, EventArgs e)
{
var engine = Python.CreateEngine();
var scope = engine.CreateScope();
engine.Execute("from gtts import gTTS", scope);
engine.Execute("tts = gTTS(\"Test\", lang='en', slow=False)", scope);
engine.Execute("tts.save(\"Test.mp3\")", scope);
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}